diff options
-rw-r--r-- | res/drawable-hdpi/ic_gel_setting_icn.png | bin | 0 -> 1694 bytes | |||
-rw-r--r-- | res/drawable-hdpi/ic_gel_wallpaper_icn.png | bin | 0 -> 1456 bytes | |||
-rw-r--r-- | res/drawable-hdpi/ic_gel_widget_icn.png | bin | 0 -> 1111 bytes | |||
-rw-r--r-- | res/drawable-mdpi/ic_gel_setting_icn.png | bin | 0 -> 1082 bytes | |||
-rw-r--r-- | res/drawable-mdpi/ic_gel_wallpaper_icn.png | bin | 0 -> 1025 bytes | |||
-rw-r--r-- | res/drawable-mdpi/ic_gel_widget_icn.png | bin | 0 -> 898 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/ic_gel_setting_icn.png | bin | 0 -> 2386 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/ic_gel_wallpaper_icn.png | bin | 0 -> 1949 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/ic_gel_widget_icn.png | bin | 0 -> 1386 bytes | |||
-rw-r--r-- | res/drawable-xxhdpi/ic_gel_setting_icn.png | bin | 0 -> 2937 bytes | |||
-rw-r--r-- | res/drawable-xxhdpi/ic_gel_wallpaper_icn.png | bin | 0 -> 2602 bytes | |||
-rw-r--r-- | res/drawable-xxhdpi/ic_gel_widget_icn.png | bin | 0 -> 1910 bytes | |||
-rw-r--r-- | res/layout/overview_panel.xml | 6 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 34 |
14 files changed, 30 insertions, 10 deletions
diff --git a/res/drawable-hdpi/ic_gel_setting_icn.png b/res/drawable-hdpi/ic_gel_setting_icn.png Binary files differnew file mode 100644 index 000000000..f80594710 --- /dev/null +++ b/res/drawable-hdpi/ic_gel_setting_icn.png diff --git a/res/drawable-hdpi/ic_gel_wallpaper_icn.png b/res/drawable-hdpi/ic_gel_wallpaper_icn.png Binary files differnew file mode 100644 index 000000000..ad13c856d --- /dev/null +++ b/res/drawable-hdpi/ic_gel_wallpaper_icn.png diff --git a/res/drawable-hdpi/ic_gel_widget_icn.png b/res/drawable-hdpi/ic_gel_widget_icn.png Binary files differnew file mode 100644 index 000000000..2bfd2c17b --- /dev/null +++ b/res/drawable-hdpi/ic_gel_widget_icn.png diff --git a/res/drawable-mdpi/ic_gel_setting_icn.png b/res/drawable-mdpi/ic_gel_setting_icn.png Binary files differnew file mode 100644 index 000000000..096e6bcc8 --- /dev/null +++ b/res/drawable-mdpi/ic_gel_setting_icn.png diff --git a/res/drawable-mdpi/ic_gel_wallpaper_icn.png b/res/drawable-mdpi/ic_gel_wallpaper_icn.png Binary files differnew file mode 100644 index 000000000..61a7b7ee1 --- /dev/null +++ b/res/drawable-mdpi/ic_gel_wallpaper_icn.png diff --git a/res/drawable-mdpi/ic_gel_widget_icn.png b/res/drawable-mdpi/ic_gel_widget_icn.png Binary files differnew file mode 100644 index 000000000..8a2cb7a2f --- /dev/null +++ b/res/drawable-mdpi/ic_gel_widget_icn.png diff --git a/res/drawable-xhdpi/ic_gel_setting_icn.png b/res/drawable-xhdpi/ic_gel_setting_icn.png Binary files differnew file mode 100644 index 000000000..fe17163b1 --- /dev/null +++ b/res/drawable-xhdpi/ic_gel_setting_icn.png diff --git a/res/drawable-xhdpi/ic_gel_wallpaper_icn.png b/res/drawable-xhdpi/ic_gel_wallpaper_icn.png Binary files differnew file mode 100644 index 000000000..d9472d981 --- /dev/null +++ b/res/drawable-xhdpi/ic_gel_wallpaper_icn.png diff --git a/res/drawable-xhdpi/ic_gel_widget_icn.png b/res/drawable-xhdpi/ic_gel_widget_icn.png Binary files differnew file mode 100644 index 000000000..da6e3e9c2 --- /dev/null +++ b/res/drawable-xhdpi/ic_gel_widget_icn.png diff --git a/res/drawable-xxhdpi/ic_gel_setting_icn.png b/res/drawable-xxhdpi/ic_gel_setting_icn.png Binary files differnew file mode 100644 index 000000000..813716def --- /dev/null +++ b/res/drawable-xxhdpi/ic_gel_setting_icn.png diff --git a/res/drawable-xxhdpi/ic_gel_wallpaper_icn.png b/res/drawable-xxhdpi/ic_gel_wallpaper_icn.png Binary files differnew file mode 100644 index 000000000..352544606 --- /dev/null +++ b/res/drawable-xxhdpi/ic_gel_wallpaper_icn.png diff --git a/res/drawable-xxhdpi/ic_gel_widget_icn.png b/res/drawable-xxhdpi/ic_gel_widget_icn.png Binary files differnew file mode 100644 index 000000000..934243706 --- /dev/null +++ b/res/drawable-xxhdpi/ic_gel_widget_icn.png diff --git a/res/layout/overview_panel.xml b/res/layout/overview_panel.xml index e05adf2b9..e4f4c8960 100644 --- a/res/layout/overview_panel.xml +++ b/res/layout/overview_panel.xml @@ -26,6 +26,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/widget_button_text" + android:drawablePadding="4dp" + android:drawableTop="@drawable/ic_gel_widget_icn" android:textSize="18dp"/> <Space android:layout_width="@dimen/overview_panel_buttonSpacing" @@ -35,6 +37,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/wallpaper_button_text" + android:drawablePadding="4dp" + android:drawableTop="@drawable/ic_gel_wallpaper_icn" android:textSize="18dp" /> <Space android:layout_width="@dimen/overview_panel_buttonSpacing" @@ -44,5 +48,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/settings_button_text" + android:drawablePadding="4dp" + android:drawableTop="@drawable/ic_gel_setting_icn" android:textSize="18dp" /> </LinearLayout> diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 596ac1113..c0b2ae390 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1950,7 +1950,8 @@ public class Workspace extends SmoothPagedView AlphaUpdateListener.updateVisibility(getPageIndicator()); } searchBar.setAlpha(finalSearchBarAlpha); - AlphaUpdateListener.updateVisibility(mLauncher.getSearchBar()); + AlphaUpdateListener.updateVisibility(searchBar); + updateCustomContentVisibility(); } if (finalSearchBarAlpha == 0) { mLauncher.setVoiceButtonProxyVisible(false); @@ -2017,10 +2018,27 @@ public class Workspace extends SmoothPagedView private void onTransitionPrepare() { mIsSwitchingState = true; updateChildrenLayersEnabled(false); - if (mState != Workspace.State.NORMAL) { - if (hasCustomContent()) { - mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(INVISIBLE); - } + hideCustomContentIfNecessary(); + } + + void updateCustomContentVisibility() { + int visibility = mState == Workspace.State.NORMAL ? VISIBLE : INVISIBLE; + if (hasCustomContent()) { + mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(visibility); + } + } + + void showCustomContentIfNecessary() { + boolean show = mState == Workspace.State.NORMAL; + if (show && hasCustomContent()) { + mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(VISIBLE); + } + } + + void hideCustomContentIfNecessary() { + boolean hide = mState != Workspace.State.NORMAL; + if (hide && hasCustomContent()) { + mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(INVISIBLE); } } @@ -2037,11 +2055,7 @@ public class Workspace extends SmoothPagedView cl.setShortcutAndWidgetAlpha(1f); } } - if (mState == Workspace.State.NORMAL) { - if (hasCustomContent()) { - mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(VISIBLE); - } - } + showCustomContentIfNecessary(); } @Override |