当前位置: 首页 > news >正文

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

http://www.lryc.cn/news/94967.html

相关文章:

  • Mysql 备份与还原
  • Cadence PCB 仿真Model Integrity专题
  • 记一次阿里云被挖矿处理记录
  • Linux系统使用(超详细)
  • 【问题总结】Docker环境下备份和恢复postgresql数据库
  • 《TCP IP网络编程》第六章
  • 如何学习java
  • RabbitMQ实现六类工作模式
  • all in one (群辉、软路由、win/linux)折腾日记
  • 【Redis】2、Redis应用之【根据 Session 和 Redis 进行登录校验和发送短信验证码】
  • MiniGPT4系列之二推理篇命令行方式:在RTX-3090 Ubuntu服务器推理详解
  • Android TvSettings Bug: 密码框无法点击唤起输入法
  • Windows, MacOS还是Linux好?
  • Gateway自定义过滤器——全局过滤器
  • Android App的几个核心概念
  • window10安装telnet
  • 大厂sql真题讲解(黑马)
  • SpringBoot整合EasyExcel实现读操作
  • go mod 设置国内源 windows 环境 win10
  • 智能决策支持系统实现的关键技术分析
  • OSS对象存储后端实现+Vue实现图片上传【基于若依管理系统开发】
  • 人工智能学习目录
  • Vue单页面实现el-tree el-breadcrumb功能、el-tree右键点击树节点展示菜单功能、树节点编辑节点字段名称功能
  • C++核心编程之函数高级使用
  • 如何创建智能合约游戏系统
  • 如何用rust实现一个异步channel
  • gitee上传项目到仓库
  • day27 贪心算法
  • Java实现字符串反转
  • vue - 常见的性能优化