12.16Android button动画和反编译修改apk内容

逆向工程:

http://blog.csdn.net/c_major/article/details/41957779

使用

apktool d apk文件名.apk  目的目录  

反编译

得到

目录\smali文件夹,在打开com文件夹,再依次\example\firstreverse,找到众多smali文件


 smali文件就是反编译的结果,我们可以从smali代码中看出软件的端倪。

修改一个字符串:

const-string v1, "Hello World!"############修改为const-string v1,"Hello World! Changed!"  


重新打包为apk文件
    命令:apktool b ReverseDemo
    注意:上面是ReverseDemo文件夹,就是你逆向后得到的文件夹
    不出意外会在ReverseDemo里生成dist文件夹,

打开dist文件夹,里面会有ReverseDemo.apk 文件,签名后即可安装到手机上




出处:http://blog.csdn.net/dyllove98/article/details/41960279\

button属性动画(默认的动画(animator)在button_state_list_anim_material.xml定义

<Button

    ...

  

    android:stateListAnimator="@null" />

 

<Button

    ...

  

    android:stateListAnimator="@anim/my_animator" />


这里是一个展示状态下不可用,按钮处于点击状态的例子

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<? xml  version = "1.0"  encoding = "utf-8" ?>
< selector  xmlns:android = "http://schemas.android.com/apk/res/android" >
     < item  android:state_pressed = "true"  android:state_enabled = "true" >
         < set >
             < objectAnimator  android:propertyName = "translationZ"
                             android:duration = "@integer/button_pressed_animation_duration"
                             android:valueTo = "@dimen/button_pressed_z_material"
                             android:valueType = "floatType" />
             < objectAnimator  android:propertyName = "elevation"
                             android:duration = "0"
                             android:valueTo = "@dimen/button_elevation_material"
                             android:valueType = "floatType" />
         </ set >
     </ item >
     <!-- 基本状态 -->
     < item  android:state_enabled = "true" >
         < set >
             < objectAnimator  android:propertyName = "translationZ"
                             android:duration = "@integer/button_pressed_animation_duration"
                             android:valueTo = "0"
                             android:startDelay = "@integer/button_pressed_animation_delay"
                             android:valueType = "floatType" />
             < objectAnimator  android:propertyName = "elevation"
                             android:duration = "0"
                             android:valueTo = "@dimen/button_elevation_material"
                             android:valueType = "floatType"  />
         </ set >
     </ item >
     ...
 
</ selector >






你可能感兴趣的:(android)