Loading res/layout/search_drop_target_bar.xml +1 −2 Original line number Diff line number Diff line Loading @@ -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 --> Loading src/com/android/launcher3/DeviceProfile.java +9 −5 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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); Loading Loading
res/layout/search_drop_target_bar.xml +1 −2 Original line number Diff line number Diff line Loading @@ -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 --> Loading
src/com/android/launcher3/DeviceProfile.java +9 −5 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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); Loading