Merge "Sanitizing various search container ids and layout names" into ub-launcher3-dorval-polish
This commit is contained in:
committed by
Android (Google) Code Review
commit
efbfcb838d
@@ -49,7 +49,7 @@
|
|||||||
<!-- DO NOT CHANGE THE ID -->
|
<!-- DO NOT CHANGE THE ID -->
|
||||||
<com.android.launcher3.allapps.AllAppsRecyclerView
|
<com.android.launcher3.allapps.AllAppsRecyclerView
|
||||||
android:id="@+id/apps_list_view"
|
android:id="@+id/apps_list_view"
|
||||||
android:layout_below="@+id/search_container"
|
android:layout_below="@id/search_container_all_apps"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center_horizontal|top"
|
android:layout_gravity="center_horizontal|top"
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
platform bug, which prevents using custom attributes in <include> tag -->
|
platform bug, which prevents using custom attributes in <include> tag -->
|
||||||
<include
|
<include
|
||||||
layout="?android:attr/keyboardLayout"
|
layout="?android:attr/keyboardLayout"
|
||||||
android:id="@+id/search_container" />
|
android:id="@id/search_container_all_apps" />
|
||||||
|
|
||||||
<include layout="@layout/all_apps_fast_scroller" />
|
<include layout="@layout/all_apps_fast_scroller" />
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
-->
|
-->
|
||||||
<com.android.launcher3.allapps.search.AppsSearchContainerLayout
|
<com.android.launcher3.allapps.search.AppsSearchContainerLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/search_container"
|
android:id="@id/search_container_all_apps"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/all_apps_search_bar_height"
|
android:layout_height="@dimen/all_apps_search_bar_height"
|
||||||
android:layout_gravity="center|top"
|
android:layout_gravity="center|top"
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:id="@+id/qsb_container"
|
android:id="@id/search_container_workspace"
|
||||||
android:padding="0dp" >
|
android:padding="0dp" >
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<item name="android:windowNoTitle">true</item>
|
<item name="android:windowNoTitle">true</item>
|
||||||
<item name="android:windowActionModeOverlay">true</item>
|
<item name="android:windowActionModeOverlay">true</item>
|
||||||
<item name="android:colorEdgeEffect">?android:attr/textColorSecondary</item>
|
<item name="android:colorEdgeEffect">?android:attr/textColorSecondary</item>
|
||||||
<item name="android:keyboardLayout">@layout/all_apps_search_container</item>
|
<item name="android:keyboardLayout">@layout/search_container_all_apps</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Workspace -->
|
<!-- Workspace -->
|
||||||
|
|||||||
@@ -140,4 +140,10 @@
|
|||||||
<item type="id" name="action_resize" />
|
<item type="id" name="action_resize" />
|
||||||
<item type="id" name="action_deep_shortcuts" />
|
<item type="id" name="action_deep_shortcuts" />
|
||||||
<item type="id" name="action_dismiss_notification" />
|
<item type="id" name="action_dismiss_notification" />
|
||||||
|
|
||||||
|
<!-- QSB IDs. DO not change -->
|
||||||
|
<item type="id" name="search_container_workspace" />
|
||||||
|
<item type="id" name="search_container_hotseat" />
|
||||||
|
<item type="id" name="search_container_all_apps" />
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<item name="android:windowShowWallpaper">true</item>
|
<item name="android:windowShowWallpaper">true</item>
|
||||||
<item name="android:windowNoTitle">true</item>
|
<item name="android:windowNoTitle">true</item>
|
||||||
<item name="android:colorEdgeEffect">#FF757575</item>
|
<item name="android:colorEdgeEffect">#FF757575</item>
|
||||||
<item name="android:keyboardLayout">@layout/all_apps_search_container</item>
|
<item name="android:keyboardLayout">@layout/search_container_all_apps</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="BaseLauncherThemeWithCustomAttrs" parent="@style/BaseLauncherTheme">
|
<style name="BaseLauncherThemeWithCustomAttrs" parent="@style/BaseLauncherTheme">
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ public class Launcher extends BaseActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View findViewById(int id) {
|
public <T extends View> T findViewById(int id) {
|
||||||
return mLauncherView.findViewById(id);
|
return mLauncherView.findViewById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -600,12 +600,12 @@ public class Workspace extends PagedView
|
|||||||
// In transposed layout, we add the QSB in the Grid. As workspace does not touch the
|
// In transposed layout, we add the QSB in the Grid. As workspace does not touch the
|
||||||
// edges, we do not need a full width QSB.
|
// edges, we do not need a full width QSB.
|
||||||
qsb = LayoutInflater.from(getContext())
|
qsb = LayoutInflater.from(getContext())
|
||||||
.inflate(R.layout.qsb_container,firstPage, false);
|
.inflate(R.layout.search_container_workspace,firstPage, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
CellLayout.LayoutParams lp = new CellLayout.LayoutParams(0, 0, firstPage.getCountX(), 1);
|
CellLayout.LayoutParams lp = new CellLayout.LayoutParams(0, 0, firstPage.getCountX(), 1);
|
||||||
lp.canReorder = false;
|
lp.canReorder = false;
|
||||||
if (!firstPage.addViewToCellLayout(qsb, 0, R.id.qsb_container, lp, true)) {
|
if (!firstPage.addViewToCellLayout(qsb, 0, R.id.search_container_workspace, lp, true)) {
|
||||||
Log.e(TAG, "Failed to add to item at (0, 0) to CellLayout");
|
Log.e(TAG, "Failed to add to item at (0, 0) to CellLayout");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -623,7 +623,7 @@ public class Workspace extends PagedView
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recycle the QSB widget
|
// Recycle the QSB widget
|
||||||
View qsb = findViewById(R.id.qsb_container);
|
View qsb = findViewById(R.id.search_container_workspace);
|
||||||
if (qsb != null) {
|
if (qsb != null) {
|
||||||
((ViewGroup) qsb.getParent()).removeView(qsb);
|
((ViewGroup) qsb.getParent()).removeView(qsb);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
|||||||
mAppsRecyclerView.addOnScrollListener(new SpringMotionOnScrollListener());
|
mAppsRecyclerView.addOnScrollListener(new SpringMotionOnScrollListener());
|
||||||
}
|
}
|
||||||
|
|
||||||
mSearchContainer = findViewById(R.id.search_container);
|
mSearchContainer = findViewById(R.id.search_container_all_apps);
|
||||||
mSearchUiManager = (SearchUiManager) mSearchContainer;
|
mSearchUiManager = (SearchUiManager) mSearchContainer;
|
||||||
mSearchUiManager.initialize(mApps, mAppsRecyclerView);
|
mSearchUiManager.initialize(mApps, mAppsRecyclerView);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user