- 浏览: 169796 次
- 性别:
- 来自: 北京
-
最新评论
-
wangzhengfu:
看你这文章很纠结,既然把图贴出来了,为啥不贴上代码呢
android EditText 去除边框 -
sovio:
...
android EditText 去除边框 -
kdac:
啥J8翻译啊,谷歌翻译贴出来的吧?翻译不了就放原文,不伦不类, ...
android 弹出软键盘将底部视图顶起问题 -
shiny_txdd:
17:34:47,806 ERROR [ContextLoad ...
tomcat项目转jboss5.0 -
lenomon:
这里有篇实现无下划线的,Android使用TextView实现 ...
Android TextView中文字设置超链接、颜色、字体
文章列表
Android由于其代码是放在dalvik虚拟机上的托管代码,所以能够很容易的将其反编译为我们可以识别的代码。
之前我写过一篇文章反编译Android的apk包到smali文件 然后再重新编译签名后打包实现篡改apk的功能。
见http://blog.csdn.net/Zengyangtech/archive/2010/08/12/5807517.aspx
最近又有一种新的方法来实现直接从Android apk包里的classes.dex文件,把dex码反编译到java的.class二进制码,然后从.class二进制码反编译到java源码想必就不用我 ...
Dex 文件是Android上运行于delvik的java二进制文件,如果你对其中的内容感兴趣而开发人员没有公布源代码,你可以用如下方法反编译dex文件:
1 解压system.img
用xyaffs2解压system.img 等你所需要解压的img文件:
xyaffs2 img_file output_dir
xyaffs2可以从如下地址下载:
http://limodev.cn/download/xyaffs.tar.gz
2 从输出目录找到你感兴趣的apk包,用unzip解压apk文件包:
unzip C ...
一、前言:
大家好,今天给大家分享一下Android中的拿来主义,我们时常会碰到一个自己觉得很漂亮很帅气的应用(apk),所以我们会尝试用WinRAR等之类工具查看,而一般的应用程序打包后的目录通常是这样的如下图:
当然res里的图片是可以拿来就用的(笔者的好多应用的图片都是从别人的apk里扣出来的),而诸如layout里的布局及权限文件
(AndroidManifest.xml)已经是一堆乱码了,完全看不懂,想看看别人是怎么布局的都不容易。还有源代码都被编译成了
classes.dex,完全看不出什么线索。基于以上的困惑,笔者给大家分享一下Android中的拿来主义。
二、所需工 ...
安装
1.先装JAVA环境,JDK/JRE都行,官网下载
装过的就跳过吧(建议最好 JDK/JRE 1.6)
2.下载apktool.jar及相关文件,这里
下apktool-1.0.0.tar.bz2
和apktool-install-windows-2.1_r01-1.zip
3.解压apktool.jar到 C:\Windows 解压apktool-install-windows.zip到任意文件夹(例如E盘根目录)
4.Win+R 运行CMD,用cd命令转到apktool-install-windows所在文件夹,输入apktool看看。会列出 ...
我们在开发的过程中,往往为了美化界面的需要,会修改按钮的默认外观,而因为Android中的按钮有三种状态—默认,被点击,被选中。所以,如果要改变按钮的外观,需要对这三种情况都做出修改,也许在以往,我们最容易想到的就是,手动监听按钮的选中和点击事件,然后写代码来替换按钮的背景,但是在android中,我们不需要这么麻烦,android早就替我们想好了解决方案,那就是selector资源。如果我们要实现按钮的三种背景,只需在 res/drawable目录中建立这样一个XML文件:
selector.xml
<selector xmlns:android="http://sch ...
AsyncTask
extends Object
java.lang.Object
↳
android.os.AsyncTask<Params, Progress, Result>
Class Overview
AsyncTask enables proper and easy use of the UI thread. This class allows to
perform background operations and publish results on the UI thread without
...
GridView mGrid= (GridView) findViewById(R.id.gridview);
LinearLayout.LayoutParams linearParams = (LinearLayout.LayoutParams) mGrid.getLayoutParams(); // 取控件mGrid当前的布局参数
linearParams.height = 75;// 当控件的高强制设成75象素
mGrid.setLayoutParams(linearParams); // 使设置好的布局参数应用到控件mGrid2
在Android软件设计与实现中我们通常都会使用到ListView这个控件,系统有一些预置的Adapter可以使用,例如
SimpleAdapter和ArrayAdapter,但是总是会有一些情况我们需要通过自定义ListView来实现一些效果,那么在这个时候,我们
通常会 ...
EditText的background属性设置为@null就搞定了:android:background="@null"
style属性倒是可加可不加
附原文:
@SlumberMachine,
that's a great observation! But, it seems that there is more to making a
TextView editable than just setting android:editable="true". It has to
do with the "input m ...
查询数据库均会把查询的结果包装在一个Cursor的子类对象中返回。Cursor就像是位于结果集之上的一个游标,可以对结果集进行向前、向后或
随机的访问。而Cursor本身是一个接口类,提供了对结果集访问的一些抽象方法,根据功能的不同在其子类有着不同的实现。要控制查询时返回的
Cursor类型,可以自定义一个继承自CursorFactory类通过实现其newCursor()方法来返回需要的Cursor子类对象,但在
CursorFactory传入null的默认情况下,查询操作会返回一个指向第一行数据之前的SQLiteCursor的对象。
对Cursor中常用的一些方法的介绍。
有关 ...
(一)去掉标题栏和状态栏(实现全屏)
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏
注意,这个设置必须放在设置布局前面,不然会报错.
setContentView(R.layout.entrancebs);
(二)去掉所有Activty界面的TitleBar
...
AndEngine - Core-Terminology
BaseGameActivity:
The BaseGameActivity is the root of a game, that contains an Engine and manages to create a SurfaceView the contents of the Engine will be drawn into.
There is always exactly one Engine for one BaseGameActivity. You can
proceed from o ...
ITextureSource:
An
implmentation of the ITextureSource-interface like AssetTextureSource
manages to load an image onto a specific position in the Texture.
一个实现了itexturesource-interface像assettexturesource设法负载一个图像到一个具体位置到Texture。TextureRegion:
A
TextureRegion defines a rectangle ...
Texture:
A
Texture is a 'image' in the memory of the graphics chip. On Android the
width and height of a Texture has to be a power of 2. Therefore
AndEngine assembles a Texture from a couple of ITextureSources, so the
space can be used better.
一个Texture是一个'图片'在内存中的图形片段。在操作系统一个质地的宽度 ...
Camera:
A Camera defines the rectangle of the scene that is drawn on the screen, as not the whole scene is visible all the time. Usually there is one Camera per Scene, except for the SplitScreenEngines.
There are subclasses that allow zooming and smooth position changes of the Camera.
一个 ...