[XML] 纯文本查看 复制代码
<?xml version="1.0" encoding="utf-8"?>[/size]
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="Click"
android:text="click" />
</LinearLayout>
[XML] 纯文本查看 复制代码
.class public Lcom/example/smaliinjection/MyActivity;
.super Landroid/app/Activity;
.source "MyActivity.java"
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 7
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
.locals 1
.param p1, "savedInstanceState" # Landroid/os/Bundle;
.prologue
.line 11
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 12
const v0, 0x7f030001
invoke-virtual {p0, v0}, Lcom/example/smaliinjection/MainActivity;->setContentView(I)V
.line 13
return-void
.end method
.method public Click(Landroid/view/View;)V
.locals 2
.param p1, "v" # Landroid/view/View;
.prologue
.line 20
const-string v0, "hehe"
const/4 v1, 0x0
invoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
.line 21
return-void
.end method