Merge "Add a FocusArea to wrap the CarUiRecyclerView" into rvc-dev am: cde0d522ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Car/Launcher/+/11900199
Change-Id: Ia786f1633c99dcc67212a2e44d1c92823e05d155
diff --git a/res/layout/app_grid_activity.xml b/res/layout/app_grid_activity.xml
index 4e66eb3..6dd8959 100644
--- a/res/layout/app_grid_activity.xml
+++ b/res/layout/app_grid_activity.xml
@@ -14,12 +14,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<com.android.car.ui.recyclerview.CarUiRecyclerView
+<com.android.car.ui.FocusArea
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/apps_grid"
- app:layoutStyle="grid"
- app:numOfColumns="4"
+ android:id="@+id/focus_area"
android:layout_width="match_parent"
- android:layout_height="match_parent"/>
+ android:layout_height="match_parent">
+ <com.android.car.ui.recyclerview.CarUiRecyclerView
+ android:id="@+id/apps_grid"
+ app:layoutStyle="grid"
+ app:numOfColumns="4"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+</com.android.car.ui.FocusArea>
diff --git a/src/com/android/car/carlauncher/AppGridActivity.java b/src/com/android/car/carlauncher/AppGridActivity.java
index 8630ba8..9d77f18 100644
--- a/src/com/android/car/carlauncher/AppGridActivity.java
+++ b/src/com/android/car/carlauncher/AppGridActivity.java
@@ -358,7 +358,7 @@
public void onCarUiInsetsChanged(Insets insets) {
requireViewById(R.id.apps_grid)
.setPadding(0, insets.getTop(), 0, insets.getBottom());
- FocusArea focusArea = requireViewById(R.id.car_ui_recycler_view_container);
+ FocusArea focusArea = requireViewById(R.id.focus_area);
focusArea.setHighlightPadding(0, insets.getTop(), 0, insets.getBottom());
requireViewById(android.R.id.content)