Android S 修改关于手机的logo

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目录下

命名:about_phone

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值