Updating the UI for focused state of an icon/folder.
issue: 16352129
Change-Id: If2e154dba06a0648f933f9aea38898642db9fd85
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index fcedaea..4a70771 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -112,6 +112,8 @@
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 @@
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 @@
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.