任务管理界面添加显示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 ...
随机推荐
- 下载和编译 Open XML SDK
我们需要一些工具来开始 Open XML 的开发. 开发工具 推荐的开发工具是 Visual Studio 社区版. 开发工具:Visual Studio Community 2013 下载地址:ht ...
- 网站图片优化-解码JPEG
首先,老大拿了两个网站工具的分析跟我说,让我分析一下我们网站的图片有没有什么方法优化. [网站分析工具]webpage test: http://www.webpagetest.org/谷歌pages ...
- 【Unity Shaders】学习笔记——SurfaceShader(二)两个结构体和CG类型
[Unity Shaders]学习笔记——SurfaceShader(二)两个结构体和CG类型 转载请注明出处:http://www.cnblogs.com/-867259206/p/5596698. ...
- 传输层(一)TCP的三次握手和四次挥手及关闭套接字的原理
TCP连接需三次握手才能建立,断开连接则需要四次握手. 客户端TCP状态迁移: CLOSED->SYN_SENT->ESTABLISHED->FIN_WAIT_1->FIN_W ...
- Android开发-API指南-<uses-configuration>
<uses-configuration> 英文原文:http://developer.android.com/guide/topics/manifest/uses-configuratio ...
- 慕课网-安卓工程师初养成-2-6 Java中的数据类型
来源:http://www.imooc.com/code/1230 通常情况下,为了方便物品的存储,我们会规定每个盒子可以存放的物品种类,就好比在“放臭袜子的盒子”里我们是不会放“面包”的!同理,变量 ...
- oracle通过DBlink连接mysql(MariaDB)
1.安装先装 mysql-connector-odbc(或 mariadb-connector-odbc )和unixODBChttps://downloads.mariadb.org/mariadb ...
- php 调用.net的webservice 需要注意的
首先 SoapClient类这个类用来使用Web services.SoapClient类可以作为给定Web services的客户端.它有两种操作形式:* WSDL 模式* Non-WSDL 模式在 ...
- shell脚本循环执行mysql语句
参考资料:Shell脚本中执行mysql语句 需求:数据库里有张数据表存储的是用户对电影的评价(user_id movie_id rating time),但是我现在要每部电影的总评分. 解决方法: ...
- ios项目记录
1,如何隐藏状态栏 在基类中重载UIViewController.h中的这个方法 - (BOOL)prefersStatusBarHidden { // iOS7后,[[UIApplication s ...