一、修改路径
/home/ss/Work4.3-X9/buildsystem/android10/frameworks/base/packages/CarSystemUI/res/layout/super_status_bar.xml
二、将里面car_top_navigation_bar替换成自己的布局就可以了
替换之前的代码是(大概在layout/super_status_bar.xml的第61行)
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_height"
android:orientation="vertical"
android:background="@drawable/main_bg_top"
>
<FrameLayout
android:id="@+id/status_bar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<include layout="@layout/car_top_navigation_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
替换完成的代码
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_height"
android:orientation="vertical"
android:background="@drawable/main_bg_top"
>
<FrameLayout
android:id="@+id/status_bar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<include layout="@layout/top_nva"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
经过替换导航栏与状态栏后,我们开机后的页面就变成了如下
![](https://img.haomeiwen.com/i20017690/c4e009c86e7ce350.png)
网友评论