summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-02-16 13:33:15 -0800
committerSunny Goyal <sunnygoyal@google.com>2017-02-23 16:15:25 -0800
commit2a76e3fbc654481eb05ac3187896884ad1497b9f (patch)
treec5b1aa7edd31277e487bada373da308e8234c487 /res
parentf28629a47b5fcd9532683e9c9ad7aad049e0106d (diff)
downloadandroid_packages_apps_Trebuchet-2a76e3fbc654481eb05ac3187896884ad1497b9f.tar.gz
android_packages_apps_Trebuchet-2a76e3fbc654481eb05ac3187896884ad1497b9f.tar.bz2
android_packages_apps_Trebuchet-2a76e3fbc654481eb05ac3187896884ad1497b9f.zip
Removing custom state definition from FastBitmapDrawable
> For Fast scrolling, using state list animator defined in xml > For Pressed state, using onState change method in a drawable Change-Id: Ia608690f593938cf0f77e00afcc2a3076e48d8f4
Diffstat (limited to 'res')
-rw-r--r--res/animator/all_apps_fastscroll_icon_anim.xml49
-rw-r--r--res/animator/overview_button_anim.xml (renamed from res/animator-v21/overview_button_anim.xml)0
-rw-r--r--res/layout/all_apps_icon.xml1
3 files changed, 50 insertions, 0 deletions
diff --git a/res/animator/all_apps_fastscroll_icon_anim.xml b/res/animator/all_apps_fastscroll_icon_anim.xml
new file mode 100644
index 000000000..380b009a6
--- /dev/null
+++ b/res/animator/all_apps_fastscroll_icon_anim.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2017, 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_activated="true">
+ <set>
+ <objectAnimator
+ android:duration="225"
+ android:propertyName="scaleX"
+ android:valueTo="1.15"
+ android:valueType="floatType" />
+ <objectAnimator
+ android:duration="225"
+ android:propertyName="scaleY"
+ android:valueTo="1.15"
+ android:valueType="floatType" />
+ </set>
+ </item>
+
+ <item>
+ <set>
+ <objectAnimator
+ android:duration="275"
+ android:propertyName="scaleX"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ <objectAnimator
+ android:duration="275"
+ android:propertyName="scaleY"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </item>
+
+</selector> \ No newline at end of file
diff --git a/res/animator-v21/overview_button_anim.xml b/res/animator/overview_button_anim.xml
index aac3d2655..aac3d2655 100644
--- a/res/animator-v21/overview_button_anim.xml
+++ b/res/animator/overview_button_anim.xml
diff --git a/res/layout/all_apps_icon.xml b/res/layout/all_apps_icon.xml
index 1e83041d5..ca0cbcc4d 100644
--- a/res/layout/all_apps_icon.xml
+++ b/res/layout/all_apps_icon.xml
@@ -20,6 +20,7 @@
android:id="@+id/icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:stateListAnimator="@animator/all_apps_fastscroll_icon_anim"
launcher:iconDisplay="all_apps"
launcher:centerVertically="true"
android:paddingLeft="4dp"