diff options
author | Yvonne Wong <ywong@cyngn.com> | 2015-11-20 10:49:59 -0800 |
---|---|---|
committer | Yvonne Wong <ywong@cyngn.com> | 2015-11-30 11:50:09 -0800 |
commit | b3de38c976eeb5a8c4b5c1b0d68d9c84253d3187 (patch) | |
tree | fd5ebd4fecaa73e607d422575a34c474e594c20b /src/com/android/launcher3/BubbleTextView.java | |
parent | 9a147bf42d2e3b3fb565e4264efe00eb293454b8 (diff) | |
download | android_packages_apps_Trebuchet-b3de38c976eeb5a8c4b5c1b0d68d9c84253d3187.tar.gz android_packages_apps_Trebuchet-b3de38c976eeb5a8c4b5c1b0d68d9c84253d3187.tar.bz2 android_packages_apps_Trebuchet-b3de38c976eeb5a8c4b5c1b0d68d9c84253d3187.zip |
Reimplement CM Settings Overview Panel in the new Launcher Part 1
- Adds vertical sliding panel and animations associated with opening and closing the panel
- Adds the views for settings and animation for the drawer arrow
- Enables hiding workspace icon labels, hiding drawer icon labels, scrolling wallpaper, and larger icons
- Changes how ragged grid custom icon sizes gets defined
Change-Id: I1a82215a09486b4770494e665e598efdbabd1d3e
Diffstat (limited to 'src/com/android/launcher3/BubbleTextView.java')
-rw-r--r-- | src/com/android/launcher3/BubbleTextView.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 205c113a7..c15f07de9 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -43,6 +43,7 @@ import android.widget.TextView; import com.android.launcher3.IconCache.IconLoadRequest; import com.android.launcher3.model.PackageItemInfo; +import com.android.launcher3.settings.SettingsProvider; /** * TextView that draws a bubble behind the text. We cannot use a LineBackgroundSpan @@ -86,7 +87,7 @@ public class BubbleTextView extends TextView private final boolean mDeferShadowGenerationOnTouch; private final boolean mCustomShadowsEnabled; private final boolean mLayoutHorizontal; - private int mIconSize; + private final int mIconSize; private int mTextColor; private boolean mStayPressed; @@ -131,6 +132,13 @@ public class BubbleTextView extends TextView setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.allAppsIconTextSizePx); defaultIconSize = grid.allAppsIconSizePx; } + boolean useCompactDrawer = SettingsProvider.getBoolean(context, + SettingsProvider.SETTINGS_UI_DRAWER_COMPACT, + R.bool.preferences_interface_drawer_compact_default); + if (!useCompactDrawer) { + defaultIconSize = getResources() + .getDimensionPixelSize(R.dimen.all_apps_icon_size_ragged); + } mIconSize = a.getDimensionPixelSize(R.styleable.BubbleTextView_iconSizeOverride, defaultIconSize); @@ -435,10 +443,6 @@ public class BubbleTextView extends TextView if (mBackground != null) mBackground.setCallback(null); } - public void setIconSize(int iconSize) { - mIconSize = iconSize; - } - @Override public void setTextColor(int color) { mTextColor = color; |