diff options
-rw-r--r-- | res/layout-land/launcher.xml | 4 | ||||
-rw-r--r-- | res/layout-land/qsb.xml (renamed from res/layout-land/search_bar.xml) | 0 | ||||
-rw-r--r-- | res/layout-port/launcher.xml | 4 | ||||
-rw-r--r-- | res/layout-port/qsb.xml (renamed from res/layout-port/search_bar.xml) | 1 | ||||
-rw-r--r-- | res/layout-sw720dp/launcher.xml | 4 | ||||
-rw-r--r-- | res/layout-sw720dp/qsb.xml (renamed from res/layout-sw720dp/search_bar.xml) | 3 | ||||
-rw-r--r-- | res/layout/search_drop_target_bar.xml (renamed from res/layout/qsb_bar.xml) | 3 | ||||
-rw-r--r-- | res/values-land/styles.xml | 4 | ||||
-rw-r--r-- | res/values-sw720dp/styles.xml | 5 | ||||
-rw-r--r-- | res/values/styles.xml | 4 | ||||
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 13 | ||||
-rw-r--r-- | src/com/android/launcher3/FocusHelper.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 13 |
13 files changed, 22 insertions, 38 deletions
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml index abb19f4bb..2880c18bf 100644 --- a/res/layout-land/launcher.xml +++ b/res/layout-land/launcher.xml @@ -45,8 +45,8 @@ android:layout_gravity="end" /> <include - android:id="@+id/qsb_bar" - layout="@layout/qsb_bar" /> + android:id="@+id/search_drop_target_bar" + layout="@layout/search_drop_target_bar" /> <include layout="@layout/overview_panel" android:id="@+id/overview_panel" diff --git a/res/layout-land/search_bar.xml b/res/layout-land/qsb.xml index d56e380d0..d56e380d0 100644 --- a/res/layout-land/search_bar.xml +++ b/res/layout-land/qsb.xml diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml index 74005348c..574b73e46 100644 --- a/res/layout-port/launcher.xml +++ b/res/layout-port/launcher.xml @@ -57,8 +57,8 @@ android:layout_gravity="center_horizontal" /> <include - android:id="@+id/qsb_bar" - layout="@layout/qsb_bar" /> + android:id="@+id/search_drop_target_bar" + layout="@layout/search_drop_target_bar" /> <!-- The Workspace cling must appear under the AppsCustomizePagedView below to ensure that it is still visible during the transition to AllApps and doesn't overlay on diff --git a/res/layout-port/search_bar.xml b/res/layout-port/qsb.xml index e993f7847..4c9963dfb 100644 --- a/res/layout-port/search_bar.xml +++ b/res/layout-port/qsb.xml @@ -16,7 +16,6 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3" - style="@style/SearchDropTargetBar" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/search_frame"> diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml index 7dac2718c..64b0fa0d6 100644 --- a/res/layout-sw720dp/launcher.xml +++ b/res/layout-sw720dp/launcher.xml @@ -45,8 +45,8 @@ android:layout_height="match_parent" /> <include - android:id="@+id/qsb_bar" - layout="@layout/qsb_bar" /> + android:id="@+id/search_drop_target_bar" + layout="@layout/search_drop_target_bar" /> <include layout="@layout/overview_panel" android:id="@+id/overview_panel" diff --git a/res/layout-sw720dp/search_bar.xml b/res/layout-sw720dp/qsb.xml index 3276f3f17..4c9963dfb 100644 --- a/res/layout-sw720dp/search_bar.xml +++ b/res/layout-sw720dp/qsb.xml @@ -16,7 +16,8 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3" - style="@style/SearchDropTargetBar" + android:layout_width="match_parent" + android:layout_height="match_parent" android:background="@drawable/search_frame"> <!-- Global search icon --> <com.android.launcher3.HolographicLinearLayout diff --git a/res/layout/qsb_bar.xml b/res/layout/search_drop_target_bar.xml index 030acf6be..2d51b93ab 100644 --- a/res/layout/qsb_bar.xml +++ b/res/layout/search_drop_target_bar.xml @@ -15,14 +15,13 @@ --> <com.android.launcher3.SearchDropTargetBar xmlns:android="http://schemas.android.com/apk/res/android" - style="@style/QSBBar" + android:orientation="horizontal" android:focusable="false" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- Drag specific targets container --> <LinearLayout - style="@style/SearchDropTargetBar" android:id="@+id/drag_target_bar" android:layout_width="match_parent" android:layout_height="match_parent" diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml index fa3801d60..87a744455 100644 --- a/res/values-land/styles.xml +++ b/res/values-land/styles.xml @@ -19,10 +19,6 @@ <resources> <!-- Search Bar --> - <style name="QSBBar"> - </style> - <style name="SearchDropTargetBar"> - </style> <style name="SearchButton"> </style> <style name="DropTargetButtonContainer"> diff --git a/res/values-sw720dp/styles.xml b/res/values-sw720dp/styles.xml index b3afae399..507af1d16 100644 --- a/res/values-sw720dp/styles.xml +++ b/res/values-sw720dp/styles.xml @@ -58,11 +58,6 @@ <item name="android:maxWidth">240dp</item> </style> - <!-- QSB Search / Drop Target bar --> - <style name="QSBBar"> - </style> - <style name="SearchDropTargetBar"> - </style> <style name="SearchButton"> </style> <style name="DropTargetButtonContainer"> diff --git a/res/values/styles.xml b/res/values/styles.xml index c9834f8b5..c18dccbab 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -91,10 +91,6 @@ <item name="android:shadowRadius">4.0</item> <item name="android:shadowColor">#FF000000</item> </style> - - <style name="QSBBar"> - <item name="android:orientation">horizontal</item> - </style> <style name="SearchDropTargetBar"> </style> <style name="SearchButton"> 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) { diff --git a/src/com/android/launcher3/FocusHelper.java b/src/com/android/launcher3/FocusHelper.java index 4600985c4..bb62bac65 100644 --- a/src/com/android/launcher3/FocusHelper.java +++ b/src/com/android/launcher3/FocusHelper.java @@ -665,7 +665,7 @@ public class FocusHelper { final CellLayout layout = (CellLayout) parent.getParent(); final Workspace workspace = (Workspace) layout.getParent(); final ViewGroup launcher = (ViewGroup) workspace.getParent(); - final ViewGroup tabs = (ViewGroup) launcher.findViewById(R.id.qsb_bar); + final ViewGroup tabs = (ViewGroup) launcher.findViewById(R.id.search_drop_target_bar); final ViewGroup hotseat = (ViewGroup) launcher.findViewById(R.id.hotseat); int pageIndex = workspace.indexOfChild(layout); int pageCount = workspace.getChildCount(); diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 7ef812f85..336cf9e7a 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -256,7 +256,7 @@ public class Launcher extends Activity private AppsCustomizeTabHost mAppsCustomizeTabHost; private AppsCustomizePagedView mAppsCustomizeContent; private boolean mAutoAdvanceRunning = false; - private View mQsbBar; + private View mQsb; private Bundle mSavedState; // We set the state in both onCreate and then onNewIntent in some cases, which causes both @@ -1284,7 +1284,8 @@ public class Launcher extends Activity dragController.addDragListener(mWorkspace); // Get the search/delete bar - mSearchDropTargetBar = (SearchDropTargetBar) mDragLayer.findViewById(R.id.qsb_bar); + mSearchDropTargetBar = (SearchDropTargetBar) + mDragLayer.findViewById(R.id.search_drop_target_bar); // Setup AppsCustomize mAppsCustomizeTabHost = (AppsCustomizeTabHost) findViewById(R.id.apps_customize_pane); @@ -3458,11 +3459,11 @@ public class Launcher extends Activity } public View getQsbBar() { - if (mQsbBar == null) { - mQsbBar = mInflater.inflate(R.layout.search_bar, mSearchDropTargetBar, false); - mSearchDropTargetBar.addView(mQsbBar); + if (mQsb == null) { + mQsb = mInflater.inflate(R.layout.qsb, mSearchDropTargetBar, false); + mSearchDropTargetBar.addView(mQsb); } - return mQsbBar; + return mQsb; } protected boolean updateGlobalSearchIcon() { |