diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2014-08-12 15:58:36 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2014-08-18 13:51:51 -0700 |
commit | dcbcc86353e9ed52daac87f292aece667cd0ac71 (patch) | |
tree | a0e1c4ca2ba2e9863a2168cbc4299b136cea2f30 /src/com/android/launcher3/Folder.java | |
parent | 0fc1be164e982433e619bcbb16aa67e28ff681ef (diff) | |
download | android_packages_apps_Trebuchet-dcbcc86353e9ed52daac87f292aece667cd0ac71.tar.gz android_packages_apps_Trebuchet-dcbcc86353e9ed52daac87f292aece667cd0ac71.tar.bz2 android_packages_apps_Trebuchet-dcbcc86353e9ed52daac87f292aece667cd0ac71.zip |
Updating the UI for focused state of an icon/folder.
issue: 16352129
Change-Id: If2e154dba06a0648f933f9aea38898642db9fd85
Diffstat (limited to 'src/com/android/launcher3/Folder.java')
-rw-r--r-- | src/com/android/launcher3/Folder.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index fcedaead3..4a707711d 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -112,6 +112,8 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList private static String sDefaultFolderName; private static String sHintText; + private FocusIndicatorView mFocusIndicatorHandler; + private int DRAG_MODE_NONE = 0; private int DRAG_MODE_REORDER = 1; private int mDragMode = DRAG_MODE_NONE; @@ -178,6 +180,11 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList mScrollView = (ScrollView) findViewById(R.id.scroll_view); mContent = (CellLayout) findViewById(R.id.folder_content); + mFocusIndicatorHandler = new FocusIndicatorView(getContext()); + mContent.addView(mFocusIndicatorHandler, 0); + mFocusIndicatorHandler.getLayoutParams().height = FocusIndicatorView.DEFAULT_LAYOUT_SIZE; + mFocusIndicatorHandler.getLayoutParams().width = FocusIndicatorView.DEFAULT_LAYOUT_SIZE; + LauncherAppState app = LauncherAppState.getInstance(); DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); @@ -572,6 +579,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList textView.setOnClickListener(this); textView.setOnLongClickListener(this); + textView.setOnFocusChangeListener(mFocusIndicatorHandler); // We need to check here to verify that the given item's location isn't already occupied // by another item. |