diff --git a/samples/Support7Demos/AndroidManifest.xml b/samples/Support7Demos/AndroidManifest.xml index 2a3d7c573..7d9c24236 100644 --- a/samples/Support7Demos/AndroidManifest.xml +++ b/samples/Support7Demos/AndroidManifest.xml @@ -357,6 +357,15 @@ + + + + + + + diff --git a/samples/Support7Demos/res/anim/animation_grouping_1_01.xml b/samples/Support7Demos/res/anim/animation_grouping_1_01.xml new file mode 100644 index 000000000..86f966a3a --- /dev/null +++ b/samples/Support7Demos/res/anim/animation_grouping_1_01.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/samples/Support7Demos/res/drawable/animation_vector_drawable_grouping_1.xml b/samples/Support7Demos/res/drawable/animation_vector_drawable_grouping_1.xml new file mode 100644 index 000000000..dbdf4530b --- /dev/null +++ b/samples/Support7Demos/res/drawable/animation_vector_drawable_grouping_1.xml @@ -0,0 +1,26 @@ + + + + + + + \ No newline at end of file diff --git a/samples/Support7Demos/res/drawable/vector_drawable_grouping_1.xml b/samples/Support7Demos/res/drawable/vector_drawable_grouping_1.xml new file mode 100644 index 000000000..b4f428c12 --- /dev/null +++ b/samples/Support7Demos/res/drawable/vector_drawable_grouping_1.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/Support7Demos/res/layout-v11/appcompat_animated_vector.xml b/samples/Support7Demos/res/layout-v11/appcompat_animated_vector.xml new file mode 100644 index 000000000..d4de49158 --- /dev/null +++ b/samples/Support7Demos/res/layout-v11/appcompat_animated_vector.xml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/samples/Support7Demos/res/layout/appcompat_animated_vector.xml b/samples/Support7Demos/res/layout/appcompat_animated_vector.xml new file mode 100644 index 000000000..488102255 --- /dev/null +++ b/samples/Support7Demos/res/layout/appcompat_animated_vector.xml @@ -0,0 +1,28 @@ + + + + + + + + \ No newline at end of file diff --git a/samples/Support7Demos/res/values/strings.xml b/samples/Support7Demos/res/values/strings.xml index a70e41f65..edafbd137 100644 --- a/samples/Support7Demos/res/values/strings.xml +++ b/samples/Support7Demos/res/values/strings.xml @@ -166,7 +166,7 @@ Palette Full color palette Search... - Sorted List + RecyclerView/Sorted List Add New Item Start Action Mode @@ -197,12 +197,12 @@ AppCompat/DayNight/Dialog Usage AppCompat/DayNight/AlertDialog Usage - List popup window + AppCompat/List popup window This activity illustrates the use of list popup windows. The popup window is shown by clicking the button above. The checkbox controls the modality. The text area below logs various events - it should log a tap on itself when a non-modal popup window is dismissed by tapping on the log area. Show popup! is modal - Popup menu + AppCompat/Popup menu This activity illustrates the use of popup menus. The popup menu is shown by clicking the button above. The text area below logs various events. Show popup! Highlight @@ -213,5 +213,8 @@ Via email To my circles Print + + AnimatedVectorDrawableCompat does not work on devices running API v10 or below + AppCompat/Integrations/AnimatedVectorDrawable diff --git a/samples/Support7Demos/src/com/example/android/supportv7/app/AppCompatAnimatedVector.java b/samples/Support7Demos/src/com/example/android/supportv7/app/AppCompatAnimatedVector.java new file mode 100644 index 000000000..888bdc801 --- /dev/null +++ b/samples/Support7Demos/src/com/example/android/supportv7/app/AppCompatAnimatedVector.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.android.supportv7.app; + +import com.example.android.supportv7.R; + +import android.graphics.drawable.Animatable; +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.support.v7.app.AppCompatActivity; +import android.widget.ImageView; + + +public class AppCompatAnimatedVector extends AppCompatActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.appcompat_animated_vector); + + final ImageView imageView = (ImageView) findViewById(R.id.vector_image); + if (imageView != null) { + final Drawable src = imageView.getDrawable(); + if (src instanceof Animatable) { + ((Animatable) src).start(); + } + } + } + +}