112c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn/* 212c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * Copyright (C) 2015 The Android Open Source Project 312c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * 412c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 512c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * in compliance with the License. You may obtain a copy of the License at 612c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * 712c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * http://www.apache.org/licenses/LICENSE-2.0 812c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * 912c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * Unless required by applicable law or agreed to in writing, software distributed under the License 1012c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 1112c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * or implied. See the License for the specific language governing permissions and limitations under 1212c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn * the License. 1312c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn */ 1412c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn 1512c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynnpackage com.android.test.dynamic; 1612c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn 1712c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynnimport android.app.Activity; 1812c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynnimport android.graphics.drawable.AnimatedVectorDrawable; 1912c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynnimport android.os.Bundle; 2012c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynnimport android.widget.ImageView; 2112c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn 2212c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynnpublic class AnimatedVectorDrawableAttr extends Activity { 2312c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn @Override 2412c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn protected void onCreate(Bundle savedInstanceState) { 2512c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn super.onCreate(savedInstanceState); 2612c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn setContentView(R.layout.activity_animated_vector_drawable_attr); 2712c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn 2851efddbd3bb304de2dd47fa8cd1114ac555958bbAlan Viverette ImageView avdIv = findViewById(R.id.avd); 2912c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn AnimatedVectorDrawable avd = (AnimatedVectorDrawable) avdIv.getDrawable(); 3012c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn avd.start(); 3112c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn } 3212c137ff3f2e7db6b0825f819a9346aa8834e3cbAndrew Flynn} 33