diff --git a/res/drawable-hdpi/ic_gel_setting_icn.png b/res/drawable-hdpi/ic_gel_setting_icn.png new file mode 100644 index 0000000000..f805947104 Binary files /dev/null and b/res/drawable-hdpi/ic_gel_setting_icn.png differ diff --git a/res/drawable-hdpi/ic_gel_wallpaper_icn.png b/res/drawable-hdpi/ic_gel_wallpaper_icn.png new file mode 100644 index 0000000000..ad13c856de Binary files /dev/null and b/res/drawable-hdpi/ic_gel_wallpaper_icn.png differ diff --git a/res/drawable-hdpi/ic_gel_widget_icn.png b/res/drawable-hdpi/ic_gel_widget_icn.png new file mode 100644 index 0000000000..2bfd2c17be Binary files /dev/null and b/res/drawable-hdpi/ic_gel_widget_icn.png differ diff --git a/res/drawable-mdpi/ic_gel_setting_icn.png b/res/drawable-mdpi/ic_gel_setting_icn.png new file mode 100644 index 0000000000..096e6bcc8e Binary files /dev/null and b/res/drawable-mdpi/ic_gel_setting_icn.png differ diff --git a/res/drawable-mdpi/ic_gel_wallpaper_icn.png b/res/drawable-mdpi/ic_gel_wallpaper_icn.png new file mode 100644 index 0000000000..61a7b7ee13 Binary files /dev/null and b/res/drawable-mdpi/ic_gel_wallpaper_icn.png differ diff --git a/res/drawable-mdpi/ic_gel_widget_icn.png b/res/drawable-mdpi/ic_gel_widget_icn.png new file mode 100644 index 0000000000..8a2cb7a2fa Binary files /dev/null and b/res/drawable-mdpi/ic_gel_widget_icn.png differ diff --git a/res/drawable-xhdpi/ic_gel_setting_icn.png b/res/drawable-xhdpi/ic_gel_setting_icn.png new file mode 100644 index 0000000000..fe17163b14 Binary files /dev/null and b/res/drawable-xhdpi/ic_gel_setting_icn.png differ diff --git a/res/drawable-xhdpi/ic_gel_wallpaper_icn.png b/res/drawable-xhdpi/ic_gel_wallpaper_icn.png new file mode 100644 index 0000000000..d9472d981e Binary files /dev/null and b/res/drawable-xhdpi/ic_gel_wallpaper_icn.png differ diff --git a/res/drawable-xhdpi/ic_gel_widget_icn.png b/res/drawable-xhdpi/ic_gel_widget_icn.png new file mode 100644 index 0000000000..da6e3e9c2b Binary files /dev/null and b/res/drawable-xhdpi/ic_gel_widget_icn.png differ diff --git a/res/drawable-xxhdpi/ic_gel_setting_icn.png b/res/drawable-xxhdpi/ic_gel_setting_icn.png new file mode 100644 index 0000000000..813716def8 Binary files /dev/null and b/res/drawable-xxhdpi/ic_gel_setting_icn.png differ diff --git a/res/drawable-xxhdpi/ic_gel_wallpaper_icn.png b/res/drawable-xxhdpi/ic_gel_wallpaper_icn.png new file mode 100644 index 0000000000..3525446060 Binary files /dev/null and b/res/drawable-xxhdpi/ic_gel_wallpaper_icn.png differ diff --git a/res/drawable-xxhdpi/ic_gel_widget_icn.png b/res/drawable-xxhdpi/ic_gel_widget_icn.png new file mode 100644 index 0000000000..9342437061 Binary files /dev/null and b/res/drawable-xxhdpi/ic_gel_widget_icn.png differ diff --git a/res/layout/overview_panel.xml b/res/layout/overview_panel.xml index e05adf2b90..e4f4c89602 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"/> diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 596ac1113e..c0b2ae390e 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