From 24ce0b3708b44e738d6ee52477aa4dd917b547e7 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Tue, 14 Jan 2014 16:18:14 -0800 Subject: Fixing drop targets in phone / small tablet landscape (issue 12192781) Change-Id: I4dc8a82c8cd5ef279506e7868e33a455fba5a3be --- src/com/android/launcher3/DeviceProfile.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/com/android/launcher3/DeviceProfile.java') diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index a64d5e403..492a8798b 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -34,6 +34,7 @@ import android.view.View; import android.view.ViewGroup.LayoutParams; import android.view.WindowManager; import android.widget.FrameLayout; +import android.widget.LinearLayout; import java.util.ArrayList; import java.util.Collections; @@ -605,10 +606,13 @@ public class DeviceProfile { // Vertical search bar space lp.gravity = Gravity.TOP | Gravity.LEFT; lp.width = searchBarSpaceHeightPx; - lp.height = LayoutParams.MATCH_PARENT; + lp.height = LayoutParams.WRAP_CONTENT; searchBar.setPadding( 0, 2 * edgeMarginPx, 0, 2 * edgeMarginPx); + + LinearLayout targets = (LinearLayout) searchBar.findViewById(R.id.drag_target_bar); + targets.setOrientation(LinearLayout.VERTICAL); } else { // Horizontal search bar space lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL; @@ -621,13 +625,6 @@ public class DeviceProfile { } searchBar.setLayoutParams(lp); - // Layout the search bar - View qsbBar = launcher.getQsbBar(); - LayoutParams vglp = qsbBar.getLayoutParams(); - vglp.width = LayoutParams.MATCH_PARENT; - vglp.height = LayoutParams.MATCH_PARENT; - qsbBar.setLayoutParams(vglp); - // Layout the voice proxy View voiceButtonProxy = launcher.findViewById(R.id.voice_button_proxy); if (voiceButtonProxy != null) { -- cgit v1.2.3