`
一岁打过熊
  • 浏览: 14134 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论
文章列表
一、反编译APK得到源码 工具下载:需用到dex2jar和JD-GUI这2个工具 dex2jar下载地址:http://laichao.googlecode.com/files/dex2jar-0.0.7-SNAPSHOT.zip JD-GUI下载地址:   windows版JD-GUI:http://laichao.googlecode.com/files/jdgui.zip   Linux版JD-GUI:http://laichao.googlecode.com/files/jd-gui-0.3.2.linux.i686.tar.gz 步骤: 1.首先找到Android软件安装包中的c ...
今天学习一下单例模式。 单例模式的定义: 保证一个类只有一个实例存在,同时提供能对该实例加以访问的全局访问方法。 单例模式有三个要点: (1)某个类只能有一个实例 (2)它必须自行创建这个实例 (3)它必须自行向整个系统提供这个实例 英文定义: Ensure a class has only one instance,and provide a global point of access to it. 单例模式的优缺点分析: 优点:客户端使用单例模式类的实例的时候,只需要调用一个单一的方法即可生成唯一的实例,有利于节约资源。 缺点:首先单例模式很难实现序列化,这就导致了采用单例模式的类很 ...
今天研究了一下APK管理器代码,发现还是比较简单的,主要就是两个列表,一个显示SD卡上面的APK文件的list,一个显示已经安装的app的list。 1.获取SD卡上的APK安装文件后,要用代码读出APK里面的信息,如icon等,的主要代码如下: private void getUninatllApkInfo(Context context, String apkPath) { String PATH_PackageParser = "android.content.pm.PackageParser"; String PATH_AssetManager = &qu ...
比如现在要在时间后面加上AM、PM等显示,如果是24小时制显示就不添加,可以在SystemUI包下的clock.java类中修改,具体修改代码如下: private String addAM_PM(String re){ ContentResolver cv = getContext().getContentResolver(); String strTimeFormat = android.provider.Settings.System.getString(cv, andr ...
找到ui目录下的CameraHeadUpDisplay类,然后注释掉下面的代码: private GpsIndicator mGpsIndicator; mGpsIndicator = new GpsIndicator( context, (IconListPreference) group.findPreference(CameraSettings.KEY_RECORD_LOCATION)); mIndicatorBar.addComponent(mGpsIndicator); GLRootVie ...
在Eclipse中调试Launcher源码 1.将Launcher2代码拷贝到一个目录中然后新建一个Android工程,路径是packages/apps/Launcher2;  2.导入编译好的Android的三个包,首先需要编译好android代码,编译完成后会生成一些包文件, 这里我们用到的有:(生成的包的路径为out/target/common/obj/JAVA_LIBRARIES) 1)framework_intermediates/classes.jar :这个主要是android的框架类; 2)android-common_intermediates/classes.jar :这个 ...
Global site tag (gtag.js) - Google Analytics