任务管理界面添加显示RAM信息
显示RAM信息的核心代码是大蛋的,我只不过是整理下教程而已!
大蛋应该不会介意的吧,首先你需要apktool和SystemUI.apk,framework-res.apk
然后开始加载框架和反编译...
$ apktool if framework-res.apk
$ apktool d SystemUI.apk
然后把附件里的东西直接解压进去,附件点我
然后添加ID,打开res/values/public.xml,增加下面的ID
memory_info_total
memory_info_free
memory_info_buffers
memory_info_cached
memory_info_swapcached
然后也在res/values/ids.xml也加入上面的ID
最后修改smali/com/android/systemui/recent/MemoryInfoLayout.smali里的ID为你增加的对应ID即可!
接着在res/layout-land/下的Recent panel布局文件中加入以下内容
<com.android.systemui.recent.MemoryInfoLayout android:gravity="center_vertical" android:layout_gravity="bottom" android:clickable="true" android:layout_width="fill_parent" android:layout_height="30.0dip">
<View android:visibility="invisible" android:layout_width="5.0dip" android:layout_height="fill_parent" />
<ImageView android:background="#ff04ff11" android:layout_width="12.0dip" android:layout_height="12.0dip" />
<TextView android:textSize="12.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_total" android:paddingLeft="5.0dip" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:background="#ff061ef2" android:layout_width="12.0dip" android:layout_height="12.0dip" />
<TextView android:textSize="12.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_free" android:paddingLeft="5.0dip" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:background="#fff901e4" android:layout_width="12.0dip" android:layout_height="12.0dip" />
<TextView android:textSize="12.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_buffers" android:paddingLeft="5.0dip" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:background="#fffae602" android:layout_width="12.0dip" android:layout_height="12.0dip" />
<TextView android:textSize="12.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_cached" android:paddingLeft="5.0dip" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:background="#fffd1505" android:layout_width="12.0dip" android:layout_height="12.0dip" />
<TextView android:textSize="12.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_swapcached" android:paddingLeft="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</com.android.systemui.recent.MemoryInfoLayout>
还需要在res/layout/或者res/layout-port/里的Recent panel布局文件里加入以下内容
<com.android.systemui.recent.MemoryInfoLayout android:gravity="center_vertical" android:layout_gravity="bottom" android:clickable="true" android:layout_width="fill_parent" android:layout_height="30.0dip">
<View android:visibility="invisible" android:layout_width="5.0dip" android:layout_height="fill_parent" />
<ImageView android:background="#ff04ff11" android:layout_width="10.0dip" android:layout_height="10.0dip" />
<TextView android:textSize="10.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_total" android:paddingLeft="5.0dip" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:background="#ff061ef2" android:layout_width="10.0dip" android:layout_height="10.0dip" />
<TextView android:textSize="10.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_free" android:paddingLeft="5.0dip" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:textSize="10.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_buffers" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:background="#fffae602" android:layout_width="10.0dip" android:layout_height="10.0dip" />
<TextView android:textSize="10.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_cached" android:paddingLeft="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:textSize="10.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/memory_info_swapcached" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</com.android.systemui.recent.MemoryInfoLayout>
然后重新编译并替换dex跟布局文件就好了
任务管理界面添加显示RAM信息的更多相关文章
- JavaBean组件<jsp:forward>动作<jsp:param>动作登录页面输入用户名和密码,然后进入检查页面判断是否符合要求,符合要求跳转到成功界面,不符合要求返回登录界面,显示错误信息。
JavaBean组件 JavaBean组件实际是一种java类.通过封装属性和方法成为具有某种功能或者处理某个业务的对象. 特点:1.实现代码的重复利用.2.容易编写和维护.3.jsp页面调用方便. ...
- 为MFC界面添加一个Log Window
前言 由于早期的图像处理程序基于VC6.0,MFC也是采用VC6.0开发的.在实际处理中,我不仅需要界面的显示,有很多时候,我需要算法处理的过程中的信息,比如每个阶段的耗时,处理的图像大小,以及如果需 ...
- u-boot界面添加命令[demo]
目标板:2440 如何在u-boot界面中增加命令 在/common/目录下建立文件,调用执行函数do_bootm就行,然后在修改Makefile,就OK了. 比如在u-boot界面添加命令test ...
- [OpenCV Qt教程] 在Qt图形界面中显示OpenCV图像的OpenGL Widget (第一部分)
本文译自:http://www.robot-home.it/blog/en/software/tutorial-opencv-qt-opengl-widget-per-visualizzare-imm ...
- Dynamics CRM 客户端程序开发:在实体的列表界面添加按钮
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复114或者20140312可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 如果没有安装Ribbon Wor ...
- PHP通过ini_set()来设置显示错误信息和执行时间
PHP的 ini_set函数是设置选项中的值,在执行函数后生效,脚本结束的时候,这个设置也失效.不是所有的选项都能被改函数设置的.具体那些值能够设置,可以查看手册中的列表. 就是能够设置php.ini ...
- JUCE 界面库显示中文乱码问题
JUCE 界面库显示中文乱码问题 环境: Windows7 64位 旗舰版 Visual Studio Ultimate 2012 JUCE 4.1 问题描述: 直接使用juce::String存储中 ...
- net发布的dll方法和类显示注释信息(字段说明信息)[图解]
自己发布的dll添加的另一个项目中突然没有字段说明信息了,给使用带来了很多的不便,原因是为了跨项目引用,所以导致不显示注释信息的,一下是解决这个问题的方法. 在要发布(被引用)的项目上右键 => ...
- 在ASP.NET 5中显示错误信息
在 ASP.NET 5 中如果不进行显示错误信息的相关配置,在发生错误时,在浏览器中只能看到空白页面. 显示错误信息的配置方法如下: 1)在 project.json 中添加对 Microsoft.A ...
随机推荐
- Ubuntu上部署Ghost博客
所有文章搬运自我的个人主页:sheilasun.me 刚刚成功把自己的ghost博客部署到Linode VPS上了,在这里回顾并顺便整理一下从购买域名到部署代码到服务器的整个过程. 购买域名 万网或者 ...
- 关于lambda表达式在javascript中的使用
了解过js函数的同学应该都知道js的函数有很多种创建方式. 如: function fun(){}: var fun=function(){}: 但最近的学习中发现了lambda表达式型的创建js的匿 ...
- [codevs5578][咸鱼]tarjan/结论题
5578 咸鱼 时间限制: 1 s 空间限制: 128000 KB 题目描述 Description 在广袤的正方形土地上有n条水平的河流和m条垂直的河流,发达的咸鱼家族在m*n个河流交叉点都 ...
- 学习练习 java 小题
Scanner a = new Scanner(System.in); System.out.println("请输入您的分数"); int fen = a.nextInt(); ...
- tomcat 页面管理
<role rolename="admin-gui"/> <role rolename="manager-gui"/> <user ...
- angular 页面加载时可以调用 函数处理
转载于 作者:海底苍鹰地址:http://blog.51yip.com/jsjquery/1599.html 我希望页面加载的时候,我能马上处理页面的数据,如请求API .... 所以这样设置 在某个 ...
- CLRS:Insert sort in in c
#include<stdio.h>#include<string.h>#include<stdlib.h>#include<time.h>#define ...
- magento2 客户端模式less样式修改。
后台模式改为客户端编译,修改less后要删除静态文件,然后清除缓存,清除浏览器缓存.刷新多次后生效.
- SQL Server 修复数据库 相关 脚本 之 DBCC CHECKDB 用法 来自同事分享
DBCC CHECKDB 用法详解, 手工修复数据库 1. 快速修复 DBCC CHECKDB ('数据库名',REPAIR_FAST) 2.重建索引并修复 DBCC CHECKDB ('数据库名', ...
- HTML 5缓存机制:Cache Manifest配置实例
Cache Manifest是HTML 5的一种缓存机制,文章作者直接用博客当测试环境,虽然[color=#444444 !important]应用起来非常简单,但效果却出奇的好.缓存后的速度,简直是 ...