显示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信息的更多相关文章

  1. JavaBean组件<jsp:forward>动作<jsp:param>动作登录页面输入用户名和密码,然后进入检查页面判断是否符合要求,符合要求跳转到成功界面,不符合要求返回登录界面,显示错误信息。

    JavaBean组件 JavaBean组件实际是一种java类.通过封装属性和方法成为具有某种功能或者处理某个业务的对象. 特点:1.实现代码的重复利用.2.容易编写和维护.3.jsp页面调用方便. ...

  2. 为MFC界面添加一个Log Window

    前言 由于早期的图像处理程序基于VC6.0,MFC也是采用VC6.0开发的.在实际处理中,我不仅需要界面的显示,有很多时候,我需要算法处理的过程中的信息,比如每个阶段的耗时,处理的图像大小,以及如果需 ...

  3. u-boot界面添加命令[demo]

    目标板:2440 如何在u-boot界面中增加命令 在/common/目录下建立文件,调用执行函数do_bootm就行,然后在修改Makefile,就OK了. 比如在u-boot界面添加命令test ...

  4. [OpenCV Qt教程] 在Qt图形界面中显示OpenCV图像的OpenGL Widget (第一部分)

    本文译自:http://www.robot-home.it/blog/en/software/tutorial-opencv-qt-opengl-widget-per-visualizzare-imm ...

  5. Dynamics CRM 客户端程序开发:在实体的列表界面添加按钮

    关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复114或者20140312可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 如果没有安装Ribbon Wor ...

  6. PHP通过ini_set()来设置显示错误信息和执行时间

    PHP的 ini_set函数是设置选项中的值,在执行函数后生效,脚本结束的时候,这个设置也失效.不是所有的选项都能被改函数设置的.具体那些值能够设置,可以查看手册中的列表. 就是能够设置php.ini ...

  7. JUCE 界面库显示中文乱码问题

    JUCE 界面库显示中文乱码问题 环境: Windows7 64位 旗舰版 Visual Studio Ultimate 2012 JUCE 4.1 问题描述: 直接使用juce::String存储中 ...

  8. net发布的dll方法和类显示注释信息(字段说明信息)[图解]

    自己发布的dll添加的另一个项目中突然没有字段说明信息了,给使用带来了很多的不便,原因是为了跨项目引用,所以导致不显示注释信息的,一下是解决这个问题的方法. 在要发布(被引用)的项目上右键 => ...

  9. 在ASP.NET 5中显示错误信息

    在 ASP.NET 5 中如果不进行显示错误信息的相关配置,在发生错误时,在浏览器中只能看到空白页面. 显示错误信息的配置方法如下: 1)在 project.json 中添加对 Microsoft.A ...

随机推荐

  1. Linux 串口使用

    1. 安装串口调试工具minicom sudo apt-get install minicom 2. 查看串口端口 cfm@cfm880:~$ dmesg | grep tty[ 0.000000] ...

  2. EXT学习之——Ext下拉框绑定以及级联写法

    /*******步骤有四个,缺一不可*********/ function () {xxxxxx = Ext.extend(construct, {InitControl: function () { ...

  3. rsync 参数断点续传

    断点续传是使用大写P参数,-P这个参数是综合了--partial --progress两个参数 rsync -avzP /home/hadoop/jdk1..0_73.tar.gz root@10.2 ...

  4. Linux系统(X64)安装Oracle11g完整安装图文教程另附基本操作

    一:查看本地ssh服务 Linux系统下安装启动ssh服务,下面以CentOS版本Linux系统为例: 1.检查是否装了SSH包 rpm -qa |grep ssh 2.没有安装SSH直接YUM安装 ...

  5. ASP.NET MVC 开源项目学习之ProDinner (二)

    下面我们来看第二层:Data   这一层相对来说是对Core层的具体实现了. 从命名可以看出来,这和数据库相关. 1.Db.cs CodeFirst模式的本地数据库类,继承了DbContext. pr ...

  6. js中的条件语句

    //js中的条件语句 ; //example1 单分支语句 ){ console.log("你已经不年轻了!"); }else{ console.log("你依然很有活力 ...

  7. java jdbc 封装。。

    JDBC工具类...package it.cast.jdbcutils; import java.io.InputStream; import java.sql.Connection; import ...

  8. C# 发送邮件方法

    发送邮件所用的核心知识点 微软封装好的MailMessage类:主要处理发送邮件的内容(如:收发人地址.标题.主体.图片等等) 微软封装好的SmtpClient类:主要处理用smtp方式发送此邮件的配 ...

  9. 电脑U盘启动总结

    1:联想G410(笔记本) FN+F2:进入BIOS,FN+F12,快速启动选择. boot mode—>Legacy support,boot priority—>Legacy firs ...

  10. Linux日志

    一.Linux 常見的日志文件 /var/log/cron:你的 crontab 排程有没有实际被进行? 进行过程有没有发生错误?你的 /etc/crontab 是否撰写正确?在这个登录档内查询看看. ...