diff options
18 files changed, 32 insertions, 6 deletions
diff --git a/res/drawable-hdpi/portal_container_holo.9.png b/res/drawable-hdpi/portal_container_holo.9.png Binary files differindex 557ee5a98..ba8a4a8cd 100644 --- a/res/drawable-hdpi/portal_container_holo.9.png +++ b/res/drawable-hdpi/portal_container_holo.9.png diff --git a/res/drawable-hdpi/portal_ring_inner_holo.png b/res/drawable-hdpi/portal_ring_inner_holo.png Binary files differindex e95322156..857a01ec4 100644 --- a/res/drawable-hdpi/portal_ring_inner_holo.png +++ b/res/drawable-hdpi/portal_ring_inner_holo.png diff --git a/res/drawable-hdpi/portal_ring_inner_nolip_holo.png b/res/drawable-hdpi/portal_ring_inner_nolip_holo.png Binary files differindex 257fc691b..53df36a43 100644 --- a/res/drawable-hdpi/portal_ring_inner_nolip_holo.png +++ b/res/drawable-hdpi/portal_ring_inner_nolip_holo.png diff --git a/res/drawable-mdpi/portal_container_holo.9.png b/res/drawable-mdpi/portal_container_holo.9.png Binary files differindex 9a4751730..1e4afae76 100644 --- a/res/drawable-mdpi/portal_container_holo.9.png +++ b/res/drawable-mdpi/portal_container_holo.9.png diff --git a/res/drawable-mdpi/portal_ring_inner_holo.png b/res/drawable-mdpi/portal_ring_inner_holo.png Binary files differindex 3d704af65..72e0af8f8 100644 --- a/res/drawable-mdpi/portal_ring_inner_holo.png +++ b/res/drawable-mdpi/portal_ring_inner_holo.png diff --git a/res/drawable-mdpi/portal_ring_inner_nolip_holo.png b/res/drawable-mdpi/portal_ring_inner_nolip_holo.png Binary files differindex 1dbdbe841..483f0ebec 100644 --- a/res/drawable-mdpi/portal_ring_inner_nolip_holo.png +++ b/res/drawable-mdpi/portal_ring_inner_nolip_holo.png diff --git a/res/drawable-xhdpi/portal_container_holo.9.png b/res/drawable-xhdpi/portal_container_holo.9.png Binary files differindex 4ae8d223b..cedbdc401 100644 --- a/res/drawable-xhdpi/portal_container_holo.9.png +++ b/res/drawable-xhdpi/portal_container_holo.9.png diff --git a/res/drawable-xhdpi/portal_ring_inner_holo.png b/res/drawable-xhdpi/portal_ring_inner_holo.png Binary files differindex b9867c0d9..f9acfa284 100644 --- a/res/drawable-xhdpi/portal_ring_inner_holo.png +++ b/res/drawable-xhdpi/portal_ring_inner_holo.png diff --git a/res/drawable-xhdpi/portal_ring_inner_nolip_holo.png b/res/drawable-xhdpi/portal_ring_inner_nolip_holo.png Binary files differindex e218713e4..eb2cf5f8b 100644 --- a/res/drawable-xhdpi/portal_ring_inner_nolip_holo.png +++ b/res/drawable-xhdpi/portal_ring_inner_nolip_holo.png diff --git a/res/drawable-xhdpi/portal_ring_outer_holo.png b/res/drawable-xhdpi/portal_ring_outer_holo.png Binary files differindex 286bee039..281e9b565 100644 --- a/res/drawable-xhdpi/portal_ring_outer_holo.png +++ b/res/drawable-xhdpi/portal_ring_outer_holo.png diff --git a/res/drawable-xxhdpi/portal_container_holo.9.png b/res/drawable-xxhdpi/portal_container_holo.9.png Binary files differindex 2a28f4aa7..599a076d8 100644 --- a/res/drawable-xxhdpi/portal_container_holo.9.png +++ b/res/drawable-xxhdpi/portal_container_holo.9.png diff --git a/res/drawable-xxhdpi/portal_ring_inner_holo.png b/res/drawable-xxhdpi/portal_ring_inner_holo.png Binary files differindex 3b93f8342..8cd6a5930 100644 --- a/res/drawable-xxhdpi/portal_ring_inner_holo.png +++ b/res/drawable-xxhdpi/portal_ring_inner_holo.png diff --git a/res/drawable-xxhdpi/portal_ring_inner_nolip_holo.png b/res/drawable-xxhdpi/portal_ring_inner_nolip_holo.png Binary files differindex 01f330c13..0fad65629 100644 --- a/res/drawable-xxhdpi/portal_ring_inner_nolip_holo.png +++ b/res/drawable-xxhdpi/portal_ring_inner_nolip_holo.png diff --git a/res/layout/folder_icon.xml b/res/layout/folder_icon.xml index 9c5c46bd8..44056828c 100644 --- a/res/layout/folder_icon.xml +++ b/res/layout/folder_icon.xml @@ -26,6 +26,7 @@ android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:antialias="true" android:src="@drawable/portal_ring_inner_holo"/> <com.android.launcher3.BubbleTextView style="@style/WorkspaceIcon" diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml index 45986e532..8ea88799f 100644 --- a/res/layout/user_folder.xml +++ b/res/layout/user_folder.xml @@ -44,7 +44,7 @@ android:background="#00000000" android:hint="@string/folder_hint_text" android:textSize="14sp" - android:textColor="#ff33b5e5" + android:textColor="#ff777777" android:textColorHighlight="#ff333333" android:gravity="center_horizontal" android:singleLine="true" diff --git a/res/values/colors.xml b/res/values/colors.xml index 01fd64c7c..6b9221c33 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -33,4 +33,5 @@ <color name="apps_customize_icon_text_color">#FFF</color> <color name="wallpaper_picker_translucent_gray">#66000000</color> + <color name="folder_items_text_color">#FF333333</color> </resources> diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 7a7a3b61f..54f8846b1 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Canvas; +import android.graphics.Color; import android.graphics.Rect; import android.graphics.Region; import android.graphics.Region.Op; @@ -55,6 +56,8 @@ public class BubbleTextView extends TextView { private int mPressedOutlineColor; private int mPressedGlowColor; + private int mTextColor; + private boolean mShadowsEnabled = true; private boolean mIsTextVisible; private boolean mBackgroundSizeChanged; @@ -85,6 +88,7 @@ public class BubbleTextView extends TextView { LauncherAppState app = LauncherAppState.getInstance(); DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize); + setTextColor(getResources().getColor(R.color.workspace_icon_text_color)); } private void init() { @@ -290,6 +294,11 @@ public class BubbleTextView extends TextView { @Override public void draw(Canvas canvas) { + if (!mShadowsEnabled) { + super.draw(canvas); + return; + } + final Drawable background = mBackground; if (background != null) { final int scrollX = getScrollX(); @@ -340,12 +349,24 @@ public class BubbleTextView extends TextView { if (mBackground != null) mBackground.setCallback(null); } + @Override + public void setTextColor(int color) { + mTextColor = color; + super.setTextColor(color); + } + + public void setShadowsEnabled(boolean enabled) { + mShadowsEnabled = enabled; + getPaint().clearShadowLayer(); + invalidate(); + } + public void setTextVisibility(boolean visible) { Resources res = getResources(); if (visible) { - setTextColor(res.getColor(R.color.workspace_icon_text_color)); + super.setTextColor(mTextColor); } else { - setTextColor(res.getColor(android.R.color.transparent)); + super.setTextColor(res.getColor(android.R.color.transparent)); } mIsTextVisible = visible; } diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 808d85d66..47fc6c3f4 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -143,7 +143,8 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList Resources res = getResources(); mMaxCountX = (int) grid.numColumns; - mMaxCountY = mMaxNumItems = Integer.MAX_VALUE; + mMaxCountY = (int) grid.numRows; + mMaxNumItems = mMaxCountX * mMaxCountY; mInputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); @@ -526,12 +527,14 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList } protected boolean createAndAddShortcut(ShortcutInfo item) { - final TextView textView = - (TextView) mInflater.inflate(R.layout.application, this, false); + final BubbleTextView textView = + (BubbleTextView) mInflater.inflate(R.layout.application, this, false); textView.setCompoundDrawablesWithIntrinsicBounds(null, new FastBitmapDrawable(item.getIcon(mIconCache)), null, null); textView.setText(item.title); textView.setTag(item); + textView.setTextColor(getResources().getColor(R.color.folder_items_text_color)); + textView.setShadowsEnabled(false); textView.setOnClickListener(this); textView.setOnLongClickListener(this); |