FileDocCategorySizeDatePackage
AnimatedVectorDrawableTest.javaAPI DocAndroid 5.1 API2437Thu Mar 12 22:22:44 GMT 2015com.android.test.dynamic

AnimatedVectorDrawableTest

public class AnimatedVectorDrawableTest extends android.app.Activity implements View.OnClickListener

Fields Summary
private static final String
LOGCAT
protected int[]
icon
Constructors Summary
Methods Summary
public voidonClick(android.view.View v)

        AnimatedVectorDrawable d = (AnimatedVectorDrawable) v.getBackground();
        d.start();
    
protected voidonCreate(android.os.Bundle savedInstanceState)


    
        
        super.onCreate(savedInstanceState);

        ScrollView scrollView = new ScrollView(this);
        GridLayout container = new GridLayout(this);
        scrollView.addView(container);
        container.setColumnCount(1);

        for (int i = 0; i < icon.length; i++) {
            Button button = new Button(this);
            button.setWidth(400);
            button.setHeight(400);
            button.setBackgroundResource(icon[i]);
            container.addView(button);
            button.setOnClickListener(this);
        }

        setContentView(scrollView);