diff options
| -rw-r--r-- | res/layout/app_grid_activity.xml | 16 | ||||
| -rw-r--r-- | src/com/android/car/carlauncher/AppGridActivity.java | 2 |
2 files changed, 11 insertions, 7 deletions
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 final class AppGridActivity extends Activity implements InsetsChangedList 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) |
