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"
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
<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">
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"
<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
-->
<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"
<resources>
<!-- Search Bar -->
- <style name="QSBBar">
- </style>
- <style name="SearchDropTargetBar">
- </style>
<style name="SearchButton">
</style>
<style name="DropTargetButtonContainer">
<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">
<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">
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;
// 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;
}
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) {
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();
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
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);
}
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() {