diff options
author | Michael Jurka <mikejurka@google.com> | 2013-09-12 02:53:22 +0200 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2013-09-18 15:16:00 +0200 |
commit | 5664de2524be15329882bf81925d08b5de760b8c (patch) | |
tree | 8c3df8adb88f3f2450e1bf51c9ab81a5626658e9 | |
parent | 1697b79a86c8244cf2758eec93e0ba299bc107d0 (diff) | |
download | android_packages_apps_Trebuchet-5664de2524be15329882bf81925d08b5de760b8c.tar.gz android_packages_apps_Trebuchet-5664de2524be15329882bf81925d08b5de760b8c.tar.bz2 android_packages_apps_Trebuchet-5664de2524be15329882bf81925d08b5de760b8c.zip |
Update assets for pressed/focused/selected states
Also, add shadow below/above wallpaper strip
Bug: 10722070
Change-Id: I37c445bab90e103f414c95b62e101a73d060661f
38 files changed, 44 insertions, 20 deletions
diff --git a/res/drawable-hdpi/grid_focused.9.png b/res/drawable-hdpi/grid_focused.9.png Binary files differdeleted file mode 100644 index f6ae2672a..000000000 --- a/res/drawable-hdpi/grid_focused.9.png +++ /dev/null diff --git a/res/drawable-hdpi/grid_pressed.9.png b/res/drawable-hdpi/grid_pressed.9.png Binary files differdeleted file mode 100644 index cb5aea89a..000000000 --- a/res/drawable-hdpi/grid_pressed.9.png +++ /dev/null diff --git a/res/drawable-hdpi/grid_selected.9.png b/res/drawable-hdpi/grid_selected.9.png Binary files differdeleted file mode 100644 index add46a73b..000000000 --- a/res/drawable-hdpi/grid_selected.9.png +++ /dev/null diff --git a/res/drawable-hdpi/tile_picker_focused.9.png b/res/drawable-hdpi/tile_picker_focused.9.png Binary files differnew file mode 100644 index 000000000..c72d6a2c6 --- /dev/null +++ b/res/drawable-hdpi/tile_picker_focused.9.png diff --git a/res/drawable-hdpi/tile_picker_pressed.9.png b/res/drawable-hdpi/tile_picker_pressed.9.png Binary files differnew file mode 100644 index 000000000..44c65ac3c --- /dev/null +++ b/res/drawable-hdpi/tile_picker_pressed.9.png diff --git a/res/drawable-hdpi/tile_picker_selected.9.png b/res/drawable-hdpi/tile_picker_selected.9.png Binary files differnew file mode 100644 index 000000000..461bacbcb --- /dev/null +++ b/res/drawable-hdpi/tile_picker_selected.9.png diff --git a/res/drawable-hdpi/tile_shadow_bottom.9.png b/res/drawable-hdpi/tile_shadow_bottom.9.png Binary files differnew file mode 100644 index 000000000..e80558bad --- /dev/null +++ b/res/drawable-hdpi/tile_shadow_bottom.9.png diff --git a/res/drawable-hdpi/tile_shadow_top.9.png b/res/drawable-hdpi/tile_shadow_top.9.png Binary files differnew file mode 100644 index 000000000..7e93865e7 --- /dev/null +++ b/res/drawable-hdpi/tile_shadow_top.9.png diff --git a/res/drawable-mdpi/grid_focused.9.png b/res/drawable-mdpi/grid_focused.9.png Binary files differdeleted file mode 100644 index 6660a8c18..000000000 --- a/res/drawable-mdpi/grid_focused.9.png +++ /dev/null diff --git a/res/drawable-mdpi/grid_pressed.9.png b/res/drawable-mdpi/grid_pressed.9.png Binary files differdeleted file mode 100644 index c7e6b06da..000000000 --- a/res/drawable-mdpi/grid_pressed.9.png +++ /dev/null diff --git a/res/drawable-mdpi/grid_selected.9.png b/res/drawable-mdpi/grid_selected.9.png Binary files differdeleted file mode 100644 index e2732b770..000000000 --- a/res/drawable-mdpi/grid_selected.9.png +++ /dev/null diff --git a/res/drawable-mdpi/tile_picker_focused.9.png b/res/drawable-mdpi/tile_picker_focused.9.png Binary files differnew file mode 100644 index 000000000..13b325b87 --- /dev/null +++ b/res/drawable-mdpi/tile_picker_focused.9.png diff --git a/res/drawable-mdpi/tile_picker_pressed.9.png b/res/drawable-mdpi/tile_picker_pressed.9.png Binary files differnew file mode 100644 index 000000000..4e8196d36 --- /dev/null +++ b/res/drawable-mdpi/tile_picker_pressed.9.png diff --git a/res/drawable-mdpi/tile_picker_selected.9.png b/res/drawable-mdpi/tile_picker_selected.9.png Binary files differnew file mode 100644 index 000000000..eee69ec6d --- /dev/null +++ b/res/drawable-mdpi/tile_picker_selected.9.png diff --git a/res/drawable-mdpi/tile_shadow_bottom.9.png b/res/drawable-mdpi/tile_shadow_bottom.9.png Binary files differnew file mode 100644 index 000000000..d95787bac --- /dev/null +++ b/res/drawable-mdpi/tile_shadow_bottom.9.png diff --git a/res/drawable-mdpi/tile_shadow_top.9.png b/res/drawable-mdpi/tile_shadow_top.9.png Binary files differnew file mode 100644 index 000000000..8da913cc4 --- /dev/null +++ b/res/drawable-mdpi/tile_shadow_top.9.png diff --git a/res/drawable-xhdpi/grid_focused.9.png b/res/drawable-xhdpi/grid_focused.9.png Binary files differdeleted file mode 100644 index 37228b341..000000000 --- a/res/drawable-xhdpi/grid_focused.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/grid_pressed.9.png b/res/drawable-xhdpi/grid_pressed.9.png Binary files differdeleted file mode 100644 index 20d4647df..000000000 --- a/res/drawable-xhdpi/grid_pressed.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/grid_selected.9.png b/res/drawable-xhdpi/grid_selected.9.png Binary files differdeleted file mode 100644 index c8b9b6b2c..000000000 --- a/res/drawable-xhdpi/grid_selected.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/tile_picker_focused.9.png b/res/drawable-xhdpi/tile_picker_focused.9.png Binary files differnew file mode 100644 index 000000000..279e85963 --- /dev/null +++ b/res/drawable-xhdpi/tile_picker_focused.9.png diff --git a/res/drawable-xhdpi/tile_picker_pressed.9.png b/res/drawable-xhdpi/tile_picker_pressed.9.png Binary files differnew file mode 100644 index 000000000..abe0e0080 --- /dev/null +++ b/res/drawable-xhdpi/tile_picker_pressed.9.png diff --git a/res/drawable-xhdpi/tile_picker_selected.9.png b/res/drawable-xhdpi/tile_picker_selected.9.png Binary files differnew file mode 100644 index 000000000..b047591ac --- /dev/null +++ b/res/drawable-xhdpi/tile_picker_selected.9.png diff --git a/res/drawable-xhdpi/tile_shadow_bottom.9.png b/res/drawable-xhdpi/tile_shadow_bottom.9.png Binary files differnew file mode 100644 index 000000000..81571f3b7 --- /dev/null +++ b/res/drawable-xhdpi/tile_shadow_bottom.9.png diff --git a/res/drawable-xhdpi/tile_shadow_top.9.png b/res/drawable-xhdpi/tile_shadow_top.9.png Binary files differnew file mode 100644 index 000000000..8503a59fe --- /dev/null +++ b/res/drawable-xhdpi/tile_shadow_top.9.png diff --git a/res/drawable-xxhdpi/grid_focused.9.png b/res/drawable-xxhdpi/grid_focused.9.png Binary files differdeleted file mode 100644 index a8dff7a11..000000000 --- a/res/drawable-xxhdpi/grid_focused.9.png +++ /dev/null diff --git a/res/drawable-xxhdpi/grid_pressed.9.png b/res/drawable-xxhdpi/grid_pressed.9.png Binary files differdeleted file mode 100644 index cbc83d13d..000000000 --- a/res/drawable-xxhdpi/grid_pressed.9.png +++ /dev/null diff --git a/res/drawable-xxhdpi/grid_selected.9.png b/res/drawable-xxhdpi/grid_selected.9.png Binary files differdeleted file mode 100644 index f8cd673f6..000000000 --- a/res/drawable-xxhdpi/grid_selected.9.png +++ /dev/null diff --git a/res/drawable-xxhdpi/tile_picker_focused.9.png b/res/drawable-xxhdpi/tile_picker_focused.9.png Binary files differnew file mode 100644 index 000000000..1004c14b8 --- /dev/null +++ b/res/drawable-xxhdpi/tile_picker_focused.9.png diff --git a/res/drawable-xxhdpi/tile_picker_pressed.9.png b/res/drawable-xxhdpi/tile_picker_pressed.9.png Binary files differnew file mode 100644 index 000000000..9658444a1 --- /dev/null +++ b/res/drawable-xxhdpi/tile_picker_pressed.9.png diff --git a/res/drawable-xxhdpi/tile_picker_selected.9.png b/res/drawable-xxhdpi/tile_picker_selected.9.png Binary files differnew file mode 100644 index 000000000..a3cd30369 --- /dev/null +++ b/res/drawable-xxhdpi/tile_picker_selected.9.png diff --git a/res/drawable-xxhdpi/tile_shadow_bottom.9.png b/res/drawable-xxhdpi/tile_shadow_bottom.9.png Binary files differnew file mode 100644 index 000000000..55250f041 --- /dev/null +++ b/res/drawable-xxhdpi/tile_shadow_bottom.9.png diff --git a/res/drawable-xxhdpi/tile_shadow_top.9.png b/res/drawable-xxhdpi/tile_shadow_top.9.png Binary files differnew file mode 100644 index 000000000..3f2263364 --- /dev/null +++ b/res/drawable-xxhdpi/tile_shadow_top.9.png diff --git a/res/drawable/wallpaper_gallery_item.xml b/res/drawable/wallpaper_tile_fg.xml index 9ac931b58..c299f32c6 100644 --- a/res/drawable/wallpaper_gallery_item.xml +++ b/res/drawable/wallpaper_tile_fg.xml @@ -15,9 +15,9 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_checked="true" android:drawable="@drawable/grid_pressed" /> - <item android:state_focused="true" android:drawable="@drawable/grid_focused" /> - <item android:state_pressed="true" android:drawable="@drawable/grid_pressed" /> - <item android:state_selected="true" android:drawable="@drawable/grid_selected" /> + <item android:state_checked="true" android:drawable="@drawable/tile_picker_selected" /> + <item android:state_focused="true" android:drawable="@drawable/tile_picker_focused" /> + <item android:state_pressed="true" android:drawable="@drawable/tile_picker_pressed" /> + <item android:state_selected="true" android:drawable="@drawable/tile_picker_selected" /> <item android:drawable="@android:color/transparent" /> </selector> diff --git a/res/layout/wallpaper_cropper.xml b/res/layout/wallpaper_cropper.xml index 768500c0a..3a3d98a69 100644 --- a/res/layout/wallpaper_cropper.xml +++ b/res/layout/wallpaper_cropper.xml @@ -19,7 +19,7 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/wallpaper_cropper" + android:id="@+id/wallpaper_root" android:layout_width="match_parent" android:layout_height="match_parent"> <com.android.launcher3.CropView diff --git a/res/layout/wallpaper_picker.xml b/res/layout/wallpaper_picker.xml index 347a63e75..a0672f649 100644 --- a/res/layout/wallpaper_picker.xml +++ b/res/layout/wallpaper_picker.xml @@ -19,7 +19,7 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/wallpaper_picker" + android:id="@+id/wallpaper_root" android:layout_width="match_parent" android:layout_height="match_parent"> <com.android.launcher3.CropView @@ -36,14 +36,28 @@ android:indeterminate="true" android:indeterminateOnly="true" android:background="@android:color/transparent" /> - <HorizontalScrollView + <LinearLayout android:id="@+id/wallpaper_strip" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentBottom="true" > - <LinearLayout android:id="@+id/wallpaper_list" + android:layout_alignParentBottom="true" + android:orientation="vertical" + android:fitsSystemWindows="true" > + <View android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" /> - </HorizontalScrollView> + android:layout_height="2dp" + android:background="@drawable/tile_shadow_top" /> + <HorizontalScrollView + android:layout_width="match_parent" + android:layout_height="wrap_content" > + <LinearLayout android:id="@+id/wallpaper_list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" /> + </HorizontalScrollView> + <View + android:layout_width="match_parent" + android:layout_height="2dp" + android:background="@drawable/tile_shadow_bottom" /> + </LinearLayout> </RelativeLayout> diff --git a/res/layout/wallpaper_picker_gallery_item.xml b/res/layout/wallpaper_picker_gallery_item.xml index ecfba600e..976d3faae 100644 --- a/res/layout/wallpaper_picker_gallery_item.xml +++ b/res/layout/wallpaper_picker_gallery_item.xml @@ -20,8 +20,8 @@ android:layout_height="@dimen/wallpaperThumbnailHeight" android:focusable="true" android:clickable="true" - android:background="@drawable/wallpaper_gallery_item" - android:foreground="@drawable/wallpaper_gallery_item"> + android:background="@drawable/wallpaper_tile_fg" + android:foreground="@drawable/wallpaper_tile_fg"> <ImageView android:id="@+id/wallpaper_image" android:layout_width="match_parent" diff --git a/res/layout/wallpaper_picker_item.xml b/res/layout/wallpaper_picker_item.xml index 79d45c02d..0ac8f97fb 100644 --- a/res/layout/wallpaper_picker_item.xml +++ b/res/layout/wallpaper_picker_item.xml @@ -20,8 +20,8 @@ android:layout_height="@dimen/wallpaperThumbnailHeight" android:focusable="true" android:clickable="true" - android:background="@drawable/wallpaper_gallery_item" - android:foreground="@drawable/wallpaper_gallery_item"> + android:background="@drawable/wallpaper_tile_fg" + android:foreground="@drawable/wallpaper_tile_fg"> <ImageView android:id="@+id/wallpaper_image" android:layout_width="match_parent" diff --git a/src/com/android/launcher3/WallpaperPickerActivity.java b/src/com/android/launcher3/WallpaperPickerActivity.java index d980967e6..824dea642 100644 --- a/src/com/android/launcher3/WallpaperPickerActivity.java +++ b/src/com/android/launcher3/WallpaperPickerActivity.java @@ -109,8 +109,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { mIgnoreNextTap = true; } mAnim = new LauncherViewPropertyAnimator(wallpaperStrip); - mAnim.translationY(wallpaperStrip.getHeight()) - .setInterpolator(new DecelerateInterpolator(0.75f)); + mAnim.translationY(wallpaperStrip.getHeight()).alpha(0f) + .setInterpolator(new DecelerateInterpolator(0.75f)); mAnim.start(); } public void onTap() { @@ -121,7 +121,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { mAnim.cancel(); } mAnim = new LauncherViewPropertyAnimator(wallpaperStrip); - mAnim.translationY(0).setInterpolator(new DecelerateInterpolator(0.75f)); + mAnim.translationY(0).alpha(1f) + .setInterpolator(new DecelerateInterpolator(0.75f)); mAnim.start(); } } @@ -363,7 +364,16 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { cursor.close(); return thumb; } - + + protected void onStop() { + super.onStop(); + final View wallpaperStrip = findViewById(R.id.wallpaper_strip); + if (wallpaperStrip.getTranslationY() > 0) { + wallpaperStrip.setTranslationY(0); + wallpaperStrip.setAlpha(1f); + } + } + protected void onSaveInstanceState(Bundle outState) { outState.putParcelableArrayList(TEMP_WALLPAPER_TILES, mTempWallpaperTiles); } |