summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-04-27 23:48:20 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-27 23:48:21 (GMT)
commitd23cfce087df09a81e7f06f29615b3b79e2e830c (patch)
treec50e175beaf1947bdec26b6627a4dfad51045b09
parent8167dc2dcffbf4f68724bc1db2f5cfc1caf6a848 (diff)
parentd9cc780fade7a078d127c7e5b8209d414a46f0a5 (diff)
downloadandroid_packages_apps_Trebuchet-d23cfce087df09a81e7f06f29615b3b79e2e830c.zip
android_packages_apps_Trebuchet-d23cfce087df09a81e7f06f29615b3b79e2e830c.tar.gz
android_packages_apps_Trebuchet-d23cfce087df09a81e7f06f29615b3b79e2e830c.tar.bz2
Merge "Making QSB alingment match with that of recents" into ub-launcher3-burnaby
-rw-r--r--res/layout/search_drop_target_bar.xml3
-rw-r--r--src/com/android/launcher3/DeviceProfile.java14
2 files changed, 10 insertions, 7 deletions
diff --git a/res/layout/search_drop_target_bar.xml b/res/layout/search_drop_target_bar.xml
index fe18edc..69f42bb 100644
--- a/res/layout/search_drop_target_bar.xml
+++ b/res/layout/search_drop_target_bar.xml
@@ -17,8 +17,7 @@
<com.android.launcher3.SearchDropTargetBar xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:focusable="false"
- android:orientation="horizontal" >
+ android:focusable="false" >
<!-- Drag specific targets container -->
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 3dadd1a..deb8075 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -733,7 +733,6 @@ public class DeviceProfile {
public void layout(Launcher launcher) {
FrameLayout.LayoutParams lp;
- Resources res = launcher.getResources();
boolean hasVerticalBarLayout = isVerticalBarLayout();
// Layout the search bar space
@@ -741,17 +740,22 @@ public class DeviceProfile {
lp = (FrameLayout.LayoutParams) searchBar.getLayoutParams();
if (hasVerticalBarLayout) {
// Vertical search bar space
- lp.gravity = Gravity.TOP | Gravity.LEFT;
+ lp.gravity = Gravity.LEFT;
lp.width = searchBarSpaceHeightPx;
- lp.height = LayoutParams.WRAP_CONTENT;
LinearLayout targets = (LinearLayout) searchBar.findViewById(R.id.drag_target_bar);
targets.setOrientation(LinearLayout.VERTICAL);
+ FrameLayout.LayoutParams targetsLp = (FrameLayout.LayoutParams) targets.getLayoutParams();
+ targetsLp.gravity = Gravity.TOP;
+ targetsLp.height = LayoutParams.WRAP_CONTENT;
+
} else {
// Horizontal search bar space
- lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
- lp.width = searchBarSpaceWidthPx;
+ lp.gravity = Gravity.TOP;
lp.height = searchBarSpaceHeightPx;
+
+ LinearLayout targets = (LinearLayout) searchBar.findViewById(R.id.drag_target_bar);
+ targets.getLayoutParams().width = searchBarSpaceWidthPx;
}
searchBar.setLayoutParams(lp);