1.让图片加载生效
frameworks/base/packages/SettingsLib/LayoutPreference/res/layout/preference_about_phone.xml
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/entity_header"
style="@style/EntityHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/entity_header_content"
android:layout_width="320dp"
android:layout_height="wrap_content"
android:orientation="vertical"><ImageView
android:id="@+id/iv_about_phone"
android:layout_width="320dp"
android:layout_height="120dp"
android:scaleType="fitCenter"
android:src="@drawable/about_phone"
android:antialias="true"/></LinearLayout>
</LinearLayout>
图片布局文件的宽高根据实际的来调!
2.手机设置关于手机菜单添加:
vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/my_device_info.xml
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:key="my_device_info_pref_screen"
android:title="@string/about_settings"><com.android.settingslib.widget.LayoutPreference
android:key="my_device_info_header"
android:order="0"
android:layout="@layout/settings_entity_header"
android:selectable="false"
settings:isPreferenceVisible="false"/><PreferenceCategory
android:key="basic_info_category"
android:selectable="false"
android:title="@string/my_device_info_basic_info_category_title">
<!--tyd.lxd 20220711-->
<com.android.settingslib.widget.LayoutPreference
android:key="about_phone_category"
android:order="0"
android:layout="@layout/preference_about_phone"
android:selectable="false"
settings:isPreferenceVisible="true"/><!--end-->
3.添加资源文件
frameworks/base/packages/SettingsLib/LayoutPreference/res/drawable目录下文章来源:https://www.toymoban.com/news/detail-546359.html
命名:about_phone文章来源地址https://www.toymoban.com/news/detail-546359.html
到了这里,关于Android S 修改关于手机的logo的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!