diff options
| author | 2019-10-11 16:05:51 -0700 | |
|---|---|---|
| committer | 2019-10-14 13:04:21 -0700 | |
| commit | 0c8fdd9eb8665e32ad366ef2f8e0cf7023e07019 (patch) | |
| tree | 1a180409f9cb4dc1af5f519fd519052cd67bdf72 | |
| parent | 097d896b5e7fa54c69cfcb23ababeb812fb0110a (diff) | |
Use the up-to-date version of car navigation bar being rendered by the global RRO
Test: Manual -- Navigation bars (bottom, left, and right) are rendering and functioning as they did before these changes.
App Grid and Notifications buttons are not working on the left and right navigation bars,
but I've verified that such was true before these changes,
and so it doesn't seem to be a regression caused by them.
Bug: 142509189
Change-Id: I84c526b16aa06f144a601856d5ad0052dd9c56d5
3 files changed, 41 insertions, 10 deletions
diff --git a/packages/CarSystemUI/res/layout/car_left_navigation_bar.xml b/packages/CarSystemUI/res/layout/car_left_navigation_bar.xml index 72ec8d86368d..94f5b9616d9a 100644 --- a/packages/CarSystemUI/res/layout/car_left_navigation_bar.xml +++ b/packages/CarSystemUI/res/layout/car_left_navigation_bar.xml @@ -48,6 +48,18 @@ /> <com.android.systemui.statusbar.car.CarNavigationButton + android:id="@+id/grid" + android:layout_height="wrap_content" + android:layout_width="match_parent" + systemui:intent="intent:#Intent;component=com.android.car.home/.AppGridActivity;end" + systemui:longIntent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end" + android:src="@drawable/car_ic_apps" + android:background="?android:attr/selectableItemBackground" + android:paddingTop="30dp" + android:paddingBottom="30dp" + /> + + <com.android.systemui.statusbar.car.CarNavigationButton android:id="@+id/hvac" android:layout_height="wrap_content" android:layout_width="match_parent" @@ -58,6 +70,7 @@ android:paddingTop="30dp" android:paddingBottom="30dp" /> + </LinearLayout> <LinearLayout @@ -78,6 +91,7 @@ android:alpha="0.7" /> + <com.android.systemui.statusbar.policy.Clock android:id="@+id/clock" android:textAppearance="@style/TextAppearance.StatusBar.Clock" diff --git a/packages/CarSystemUI/res/layout/car_navigation_bar.xml b/packages/CarSystemUI/res/layout/car_navigation_bar.xml index 897976f439b5..18ae582c86a1 100644 --- a/packages/CarSystemUI/res/layout/car_navigation_bar.xml +++ b/packages/CarSystemUI/res/layout/car_navigation_bar.xml @@ -22,6 +22,8 @@ android:layout_height="match_parent" android:background="@drawable/system_bar_background" android:orientation="vertical"> + <!--The 20dp padding is the difference between the background selected icon size and the ripple + that was chosen, thus it's a hack to make it look pretty and not an official margin value--> <LinearLayout android:id="@id/nav_buttons" android:layout_width="match_parent" @@ -37,7 +39,6 @@ systemui:componentNames="com.android.car.carlauncher/.CarLauncher" systemui:icon="@drawable/car_ic_overview" systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end" - systemui:longIntent="intent:#Intent;action=com.google.android.demandspace.START;end" systemui:selectedIcon="@drawable/car_ic_overview_selected" systemui:useMoreIcon="false" /> @@ -108,13 +109,11 @@ android:layout_height="match_parent" android:layout_weight="1"/> - <!-- Click handling will be initialized in CarNavigationBarView because its - id = notifications which is treated special for the opening of the notification panel - --> <com.android.systemui.statusbar.car.CarNavigationButton android:id="@+id/notifications" style="@style/NavigationBarButton" - android:src="@drawable/car_ic_notification" + systemui:icon="@drawable/car_ic_notification" + systemui:longIntent="intent:#Intent;component=com.android.car.bugreport/.BugReportActivity;end" systemui:selectedIcon="@drawable/car_ic_notification_selected" systemui:useMoreIcon="false" /> @@ -124,13 +123,13 @@ android:layout_height="match_parent" android:layout_weight="1"/> - <com.android.systemui.statusbar.car.CarFacetButton + <com.android.systemui.statusbar.car.AssitantButton android:id="@+id/assist" style="@style/NavigationBarButton" systemui:icon="@drawable/ic_mic_white" - systemui:intent="intent:#Intent;action=com.google.android.demandspace.START;end" systemui:useMoreIcon="false" /> + </LinearLayout> <LinearLayout @@ -138,10 +137,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" - android:paddingStart="@*android:dimen/car_keyline_1" - android:paddingEnd="@*android:dimen/car_keyline_1" + android:paddingStart="@dimen/car_keyline_1" + android:paddingEnd="@dimen/car_keyline_1" android:gravity="center" android:visibility="gone"> + </LinearLayout> -</com.android.systemui.statusbar.car.CarNavigationBarView> +</com.android.systemui.statusbar.car.CarNavigationBarView>
\ No newline at end of file diff --git a/packages/CarSystemUI/res/layout/car_right_navigation_bar.xml b/packages/CarSystemUI/res/layout/car_right_navigation_bar.xml index 72ec8d86368d..d36d1d68b276 100644 --- a/packages/CarSystemUI/res/layout/car_right_navigation_bar.xml +++ b/packages/CarSystemUI/res/layout/car_right_navigation_bar.xml @@ -25,6 +25,9 @@ android:orientation="vertical" android:background="@drawable/system_bar_background"> + <!-- phone.NavigationBarView has rot0 and rot90 but we expect the car head unit to have a fixed + rotation so skip this level of the hierarchy. + --> <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" @@ -48,6 +51,18 @@ /> <com.android.systemui.statusbar.car.CarNavigationButton + android:id="@+id/grid" + android:layout_height="wrap_content" + android:layout_width="match_parent" + systemui:intent="intent:#Intent;component=com.android.car.home/.AppGridActivity;launchFlags=0x14000000;end" + systemui:longIntent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end" + android:src="@drawable/car_ic_apps" + android:background="?android:attr/selectableItemBackground" + android:paddingTop="30dp" + android:paddingBottom="30dp" + /> + + <com.android.systemui.statusbar.car.CarNavigationButton android:id="@+id/hvac" android:layout_height="wrap_content" android:layout_width="match_parent" @@ -58,6 +73,7 @@ android:paddingTop="30dp" android:paddingBottom="30dp" /> + </LinearLayout> <LinearLayout @@ -78,6 +94,7 @@ android:alpha="0.7" /> + <com.android.systemui.statusbar.policy.Clock android:id="@+id/clock" android:textAppearance="@style/TextAppearance.StatusBar.Clock" |