.class public Lcom/dw/sn/Notes;
.super Landroid/app/Activity;
.source "Notes.java"


# static fields
.field public static final PREFS_NAME:Ljava/lang/String; = "MyPrefsFile"


# instance fields
.field public bodytext:Landroid/widget/EditText;

.field public confirmbutton:Landroid/widget/Button;

.field public titletext:Landroid/widget/EditText;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 17
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 6
    .parameter "savedInstanceState"

    .prologue
    .line 24
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 25
    const v4, 0x7f030001

    invoke-virtual {p0, v4}, Lcom/dw/sn/Notes;->setContentView(I)V

    .line 26
    const v4, 0x7f080007

    invoke-virtual {p0, v4}, Lcom/dw/sn/Notes;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/EditText;

    iput-object v4, p0, Lcom/dw/sn/Notes;->bodytext:Landroid/widget/EditText;

    .line 27
    const v4, 0x7f080008

    invoke-virtual {p0, v4}, Lcom/dw/sn/Notes;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    .line 28
    .local v0, confirmbutton:Landroid/widget/Button;
    const v4, 0x7f080009

    invoke-virtual {p0, v4}, Lcom/dw/sn/Notes;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/Button;

    .line 31
    .local v2, settingsbutton:Landroid/widget/Button;
    const-string v4, "MyPrefsFile"

    const/4 v5, 0x0

    invoke-virtual {p0, v4, v5}, Lcom/dw/sn/Notes;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v1

    .line 32
    .local v1, settings:Landroid/content/SharedPreferences;
    const-string v4, "prefbody"

    const-string v5, "\u4fee\u6539\u5185\u5bb9"

    invoke-interface {v1, v4, v5}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 33
    .local v3, text:Ljava/lang/String;
    iget-object v4, p0, Lcom/dw/sn/Notes;->bodytext:Landroid/widget/EditText;

    invoke-virtual {v4, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 35
    new-instance v4, Lcom/dw/sn/Notes$1;

    invoke-direct {v4, p0}, Lcom/dw/sn/Notes$1;-><init>(Lcom/dw/sn/Notes;)V

    invoke-virtual {v0, v4}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 51
    new-instance v4, Lcom/dw/sn/Notes$2;

    invoke-direct {v4, p0}, Lcom/dw/sn/Notes$2;-><init>(Lcom/dw/sn/Notes;)V

    invoke-virtual {v2, v4}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 65
    return-void
.end method
