diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-08-21 13:09:24 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-08-24 17:09:34 +0000 |
commit | 6cfe5fcd8a79e9af8c5a97220dd800f4f1239b17 (patch) | |
tree | abb7aff12733be77938d55bd656bb5c514ff4298 /res | |
parent | aca16cd0f711bfadcebb5c65bf95abf1c0896f43 (diff) | |
download | android_packages_apps_Trebuchet-6cfe5fcd8a79e9af8c5a97220dd800f4f1239b17.tar.gz android_packages_apps_Trebuchet-6cfe5fcd8a79e9af8c5a97220dd800f4f1239b17.tar.bz2 android_packages_apps_Trebuchet-6cfe5fcd8a79e9af8c5a97220dd800f4f1239b17.zip |
Updating overview buttons click feedback
> Using xml bitmap for changing alpha, instead of a new bitmap
> using state list animator, which changes the alpha of the
whole view, and not just the icon
Change-Id: I2dda9bfba390a24a83b162c3cf4bcb9a0865f4c2
Diffstat (limited to 'res')
17 files changed, 168 insertions, 0 deletions
diff --git a/res/animator-v21/overview_button_anim.xml b/res/animator-v21/overview_button_anim.xml new file mode 100644 index 000000000..aac3d2655 --- /dev/null +++ b/res/animator-v21/overview_button_anim.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2015, 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_pressed="true"> + <objectAnimator + android:duration="@android:integer/config_shortAnimTime" + android:propertyName="alpha" + android:valueTo="0.5" + android:valueType="floatType" /> + </item> + + <item android:state_focused="true"> + <objectAnimator + android:duration="@android:integer/config_shortAnimTime" + android:propertyName="alpha" + android:valueTo="0.5" + android:valueType="floatType" /> + </item> + <item> + <objectAnimator + android:duration="@android:integer/config_shortAnimTime" + android:propertyName="alpha" + android:valueTo="1" + android:valueType="floatType" /> + </item> + +</selector>
\ No newline at end of file diff --git a/res/drawable-hdpi/ic_setting_pressed.png b/res/drawable-hdpi/ic_setting_pressed.png Binary files differdeleted file mode 100644 index d5b5ca204..000000000 --- a/res/drawable-hdpi/ic_setting_pressed.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_wallpaper_pressed.png b/res/drawable-hdpi/ic_wallpaper_pressed.png Binary files differdeleted file mode 100644 index 1588ce717..000000000 --- a/res/drawable-hdpi/ic_wallpaper_pressed.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_widget_pressed.png b/res/drawable-hdpi/ic_widget_pressed.png Binary files differdeleted file mode 100644 index 19d6feded..000000000 --- a/res/drawable-hdpi/ic_widget_pressed.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_setting_pressed.png b/res/drawable-mdpi/ic_setting_pressed.png Binary files differdeleted file mode 100644 index 61e574ad1..000000000 --- a/res/drawable-mdpi/ic_setting_pressed.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_wallpaper_pressed.png b/res/drawable-mdpi/ic_wallpaper_pressed.png Binary files differdeleted file mode 100644 index aa598c3e2..000000000 --- a/res/drawable-mdpi/ic_wallpaper_pressed.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_widget_pressed.png b/res/drawable-mdpi/ic_widget_pressed.png Binary files differdeleted file mode 100644 index 9b690d99b..000000000 --- a/res/drawable-mdpi/ic_widget_pressed.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_setting_pressed.png b/res/drawable-xhdpi/ic_setting_pressed.png Binary files differdeleted file mode 100644 index 005d49c8c..000000000 --- a/res/drawable-xhdpi/ic_setting_pressed.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_wallpaper_pressed.png b/res/drawable-xhdpi/ic_wallpaper_pressed.png Binary files differdeleted file mode 100644 index 5a9b84d7d..000000000 --- a/res/drawable-xhdpi/ic_wallpaper_pressed.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_widget_pressed.png b/res/drawable-xhdpi/ic_widget_pressed.png Binary files differdeleted file mode 100644 index 633c9c648..000000000 --- a/res/drawable-xhdpi/ic_widget_pressed.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_setting_pressed.png b/res/drawable-xxhdpi/ic_setting_pressed.png Binary files differdeleted file mode 100644 index d0cad5e0e..000000000 --- a/res/drawable-xxhdpi/ic_setting_pressed.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_wallpaper_pressed.png b/res/drawable-xxhdpi/ic_wallpaper_pressed.png Binary files differdeleted file mode 100644 index e5d200be1..000000000 --- a/res/drawable-xxhdpi/ic_wallpaper_pressed.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_widget_pressed.png b/res/drawable-xxhdpi/ic_widget_pressed.png Binary files differdeleted file mode 100644 index b8dd35dc6..000000000 --- a/res/drawable-xxhdpi/ic_widget_pressed.png +++ /dev/null diff --git a/res/drawable/ic_setting_pressed.xml b/res/drawable/ic_setting_pressed.xml new file mode 100644 index 000000000..689f833ce --- /dev/null +++ b/res/drawable/ic_setting_pressed.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright 2015, 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. +--> +<bitmap xmlns:android="http://schemas.android.com/apk/res/android" + android:alpha="0.5" + android:src="@drawable/ic_setting" /> diff --git a/res/drawable/ic_wallpaper_pressed.xml b/res/drawable/ic_wallpaper_pressed.xml new file mode 100644 index 000000000..d241c7d76 --- /dev/null +++ b/res/drawable/ic_wallpaper_pressed.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright 2015, 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. +--> +<bitmap xmlns:android="http://schemas.android.com/apk/res/android" + android:alpha="0.5" + android:src="@drawable/ic_wallpaper" /> diff --git a/res/drawable/ic_widget_pressed.xml b/res/drawable/ic_widget_pressed.xml new file mode 100644 index 000000000..44ac5b6e4 --- /dev/null +++ b/res/drawable/ic_widget_pressed.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright 2015, 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. +--> +<bitmap xmlns:android="http://schemas.android.com/apk/res/android" + android:alpha="0.5" + android:src="@drawable/ic_widget" /> diff --git a/res/layout-v21/overview_panel.xml b/res/layout-v21/overview_panel.xml new file mode 100644 index 000000000..fb6b512fc --- /dev/null +++ b/res/layout-v21/overview_panel.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 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. +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal|bottom" + android:gravity="top" + android:orientation="horizontal" > + + <TextView + android:id="@+id/wallpaper_button" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:drawablePadding="4dp" + android:drawableTop="@drawable/ic_wallpaper" + android:fontFamily="sans-serif-condensed" + android:gravity="center_horizontal" + android:stateListAnimator="@animator/overview_button_anim" + android:text="@string/wallpaper_button_text" + android:textAllCaps="true" + android:textColor="@android:color/white" + android:textSize="12sp" /> + + <TextView + android:id="@+id/widget_button" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:drawablePadding="4dp" + android:drawableTop="@drawable/ic_widget" + android:fontFamily="sans-serif-condensed" + android:gravity="center_horizontal" + android:stateListAnimator="@animator/overview_button_anim" + android:text="@string/widget_button_text" + android:textAllCaps="true" + android:textColor="@android:color/white" + android:textSize="12sp" /> + + <TextView + android:id="@+id/settings_button" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:drawablePadding="4dp" + android:drawableTop="@drawable/ic_setting" + android:fontFamily="sans-serif-condensed" + android:gravity="center_horizontal" + android:stateListAnimator="@animator/overview_button_anim" + android:text="@string/settings_button_text" + android:textAllCaps="true" + android:textColor="@android:color/white" + android:textSize="12sp" /> + +</LinearLayout>
\ No newline at end of file |