OSDN Git Service

Add visible touch feedback to items in folders
authorAdam Cohen <adamcohen@google.com>
Thu, 24 Oct 2013 19:11:34 +0000 (12:11 -0700)
committerAdam Cohen <adamcohen@google.com>
Thu, 24 Oct 2013 19:12:46 +0000 (12:12 -0700)
Change-Id: I41937f7864bca39232079a90139679ebd5cc2a07

res/values/colors.xml
src/com/android/launcher3/BubbleTextView.java
src/com/android/launcher3/Folder.java

index dc35a3f..c073903 100644 (file)
@@ -34,6 +34,7 @@
     <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>
+    <color name="folder_items_glow_color">#FFCCCCCC</color>
     <color name="outline_color">#FFFFFFFF</color>
     
     <color name="first_run_cling_circle_background_color">#64b1ea</color>
index 8dab943..fbdbaa4 100644 (file)
@@ -203,6 +203,10 @@ public class BubbleTextView extends TextView {
         destCanvas.restore();
     }
 
+    public void setGlowColor(int color) {
+        mFocusedOutlineColor = mFocusedGlowColor = mPressedOutlineColor = mPressedGlowColor = color;
+    }
+
     /**
      * Returns a new bitmap to be used as the object outline, e.g. to visualize the drop location.
      * Responsibility for the bitmap is transferred to the caller.
index 69d9a3d..b5034d0 100644 (file)
@@ -538,6 +538,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
         textView.setTag(item);
         textView.setTextColor(getResources().getColor(R.color.folder_items_text_color));
         textView.setShadowsEnabled(false);
+        textView.setGlowColor(getResources().getColor(R.color.folder_items_glow_color));
 
         textView.setOnClickListener(this);
         textView.setOnLongClickListener(this);