summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wendt <thoemy@gmx.net>2014-05-05 22:39:24 (GMT)
committerThomas Wendt <thoemy@gmx.net>2014-05-05 22:51:24 (GMT)
commit15053474ee17aafcacafda42db8233f8ccd7770f (patch)
tree766b24c8515cfd6228b1ac20a33a70907d68c3ac
parentd027815092005de1a63d24ab0c06ea0f982b9843 (diff)
downloadandroid_packages_apps_Trebuchet-15053474ee17aafcacafda42db8233f8ccd7770f.zip
android_packages_apps_Trebuchet-15053474ee17aafcacafda42db8233f8ccd7770f.tar.gz
android_packages_apps_Trebuchet-15053474ee17aafcacafda42db8233f8ccd7770f.tar.bz2
Fix hidden "Remove" and "App info" buttons in landscape
On grouper the "Remove" and "App info" buttons are not visible if the device is in landscape. Layout the children of the drag_target_bar vertically to fix this. Fixes: https://jira.cyanogenmod.org/browse/CYAN-3744 Before: http://i.imgur.com/SHMTUjK.png After: http://i.imgur.com/4JeJi8k.png Change-Id: Ie8a9a799fa89bf8ad233202da10c808ab65a66a9
-rw-r--r--src/com/android/launcher3/DynamicGrid.java10
-rw-r--r--src/com/android/launcher3/SearchDropTargetBar.java4
2 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/launcher3/DynamicGrid.java b/src/com/android/launcher3/DynamicGrid.java
index 9be3134..6457fdc 100644
--- a/src/com/android/launcher3/DynamicGrid.java
+++ b/src/com/android/launcher3/DynamicGrid.java
@@ -31,6 +31,8 @@ import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
import com.android.launcher3.settings.SettingsProvider;
import java.util.ArrayList;
@@ -402,6 +404,14 @@ class DeviceProfile {
}
searchBar.setLayoutParams(lp);
+ // Layout the drop target icons
+ LinearLayout dropTargetBar = (LinearLayout) launcher.getSearchBar().getDropTargetBar();
+ if (hasVerticalBarLayout) {
+ dropTargetBar.setOrientation(LinearLayout.VERTICAL);
+ } else {
+ dropTargetBar.setOrientation(LinearLayout.HORIZONTAL);
+ }
+
// Layout the search bar
View qsbBar = launcher.getQsbBar();
qsbBar.setVisibility(searchBarVisible ? View.VISIBLE : View.GONE);
diff --git a/src/com/android/launcher3/SearchDropTargetBar.java b/src/com/android/launcher3/SearchDropTargetBar.java
index 435dbda..1545207 100644
--- a/src/com/android/launcher3/SearchDropTargetBar.java
+++ b/src/com/android/launcher3/SearchDropTargetBar.java
@@ -242,4 +242,8 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D
return null;
}
}
+
+ public View getDropTargetBar() {
+ return mDropTargetBar;
+ }
}