diff options
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; |