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

Android R S T U版本如何在下拉栏菜单增加基本截图功能

本文主要是MTK增加下拉栏开关菜单,功能实现为基本的截图功能,metrics_constants.proto修改 QuickSetting 新增快捷设置图标,以便对应getMetricsCategory获取;一个布局文件,一个配置加载合入实现,一个新增想要实现截图的类。

/frameworks/base/proto/src/metrics_constants/metrics_constants.proto//

SETTINGS_AWARE_DISPLAY = 1750; 

//*/add start最后代码处添加 + 数值加一即可;
    QS_SCREENSHOT = 1751;
    //*/

/vendor/mediatek/proprietary/packages/apps/SystemUI/res/drawable/ic_screenshot.xml

 新增布局文件:

<!--
Copyright (C) 2018 The Android Open Source Project

   Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24.0dp"
    android:height="24.0dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0"
    android:tint="?attr/colorControlNormal">
    <path
        android:fillColor="#FF000000"
        android:pathData="M17,1.01L7,1C5.9,1 5,1.9 5,3v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3C19,1.9 18.1,1.01 17,1.01zM17,21H7l0,-1h10V21zM17,18H7V6h10V18zM17,4H7V3h10V4z&#

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

相关文章:

  • C#二叉树原理及二叉搜索树代码实现
  • .eslintrc.js 的解释
  • 确保企业架构与业务的一致性与合规性:数字化转型中的关键要素与战略实施
  • goframe开发一个企业网站 前端界面 拆分界面7
  • Postman断言与依赖接口测试详解!
  • github打不开网络问题
  • 智能教育工具:基于SpringBoot的在线试题库
  • typescript 如何跳过ts类型检查?
  • 详解ReentrantLock--三种加锁方式
  • SQL 基础语法(一)
  • Python酷库之旅-第三方库Pandas(190)
  • Spring学习笔记_19——@PostConstruct @PreDestroy
  • 《云计算网络技术与应用》实训8-1:OpenvSwitch简单配置练习
  • 【架构艺术】服务架构稳定性的基础保障
  • Python中使用pip换源的详细指南
  • 一站打包国际智慧教育自主学练软件资源
  • 用股票API获取高频行情数据来实现数据分析和量化
  • C++ | Leetcode C++题解之第526题优美的排列
  • 【RabbitMQ】01-RabbitMQ
  • 使用 ADB 在某个特定时间点点击 Android 设备上的某个按钮
  • 【随笔】对于开发者而言,你对什么事情感到失落?亦或者你上一次感到有成就感是什么时候?你遇到过怎样格局的老板?
  • 【LeetCode】两数之和返回两数下标、数组形式整数相加
  • Kubernetes中的secrets存储
  • 使用 Elastic、OpenLLMetry 和 OpenTelemetry 跟踪 LangChain 应用程序
  • 【论文复现】VALL-E:语音合成的新里程
  • java项目之微服务在线教育系统设计与实现(springcloud)
  • P3-1.【结构化程序设计】第一节——知识要点:算法、顺序结构程序设计、if语句的语法结构及各种用法
  • Vue2——单页应用程序路由的使用
  • 变分法(Calculus of Variations)
  • 包括 Nginx、Gateway、Nacos、Dubbo、Sentinel、RocketMQ 和 Seata 的调用链路描述: