任务管理界面添加显示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 ...
随机推荐
- Jackson 框架,轻易转换JSON(转)
Jackson可以轻松的将Java对象转换成json对象和xml文档,同样也可以将json.xml转换成Java对象. 相比json-lib框架,Jackson所依赖的jar包较少,简单易用并且性能也 ...
- 【LeetCode】5. Longest Palindromic Substring 最大回文子串
题目: Given a string S, find the longest palindromic substring in S. You may assume that the maximum l ...
- Dll学习(二)__declspec用法详解
__declspec用于指定所给定类型的实例的与Microsoft相关的存储方式.其它的有关存储方式的修饰符如static与extern等是C和 C++语言的ANSI规范,而__declspec是一种 ...
- matlab 椭圆方程拟合
拟合椭圆首先要知道各个点的坐标,然和带入如下公式: x = [59 136 58 137 57 137 56 137 55 138 54 139 53 140 52 141 51 142 51 143 ...
- shell script 基本语法
几个符号的意义$#:代表后接的参数『个数』,以上表为例这裡显示为『 4 』:$@:代表『 "$1" "$2" "$3" "$4&q ...
- javaSE第九天
第九天 50 1. final关键字(掌握) 50 (1)定义: 50 (2)特点: 51 (3)面试相关: 51 A:final修饰的局部变量 51 B:fi ...
- ASP.NET内置对象一
ASP.NET提供了大量的对象类库,在这些类库中包含了许多封装好的内置对象,我们只需要直接使用这些对象的方法和属性,就能简单快速地完成很多的功能.Request对象.Response对象和Serve对 ...
- sublime搭建Java编译平台及编码问题
Sublime自带Java编译功能,当时只能编译不能运行,我们做一下小小的修改就可以让sublime一步完成编译运行的功能,实现sublime搭建Java编译平台. 使用Ctrl + B 编译时,所编 ...
- CSS控制div宽度最大宽度/高度和最小宽度/高度
在网页制作中经常要控制div宽度最大宽度/高度或者最小宽度/高度,但是在IE6中很多朋友都会遇到不兼容的头疼问题,包括我也经常遇到这样的问题,在百度查了很多都没法解决,后来在一个论坛上学习到,在这里跟 ...
- html5面向对象做一个贪吃蛇小游戏
canvas加面向对象方式的贪吃蛇 2016-08-25 这个小游戏可以增加对面向对象的理解,可以加强js逻辑能力,总之认真自己敲一两遍收获还是不少啊!!适合刚学canvas的同学练习!! 废话不多说 ...