Skip to content

Commit

Permalink
增加备份还原按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
ghy committed Sep 1, 2011
1 parent 5aaade3 commit dd65af3
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 188 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<uses-sdk android:minSdkVersion="7" />

<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Main"
<activity android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
9 changes: 4 additions & 5 deletions gen/cn/youmay/R.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ public static final class drawable {
public static final int icon=0x7f020000;
}
public static final class id {
public static final int appName=0x7f050002;
public static final int icon=0x7f050001;
public static final int lv=0x7f050000;
public static final int packageName=0x7f050003;
public static final int btnBackup=0x7f050000;
public static final int btnRestore=0x7f050001;
}
public static final class layout {
public static final int main=0x7f030000;
public static final int piitem=0x7f030001;
}
public static final class string {
public static final int app_name=0x7f040001;
public static final int backup=0x7f040002;
public static final int hello=0x7f040000;
public static final int restore=0x7f040003;
}
}
9 changes: 5 additions & 4 deletions res/layout/main.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@+id/lv" android:layout_width="fill_parent"
android:layout_height="fill_parent">
</ListView>
android:layout_height="wrap_content">
<Button android:layout_height="wrap_content" android:text="@string/backup"
android:id="@+id/btnBackup" android:maxWidth="200sp" android:layout_width="fill_parent"></Button>
<Button android:text="@string/restore" android:id="@+id/btnRestore"
android:layout_height="fill_parent" android:layout_width="fill_parent"></Button>
</LinearLayout>
12 changes: 0 additions & 12 deletions res/layout/piitem.xml

This file was deleted.

4 changes: 3 additions & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, MainActivity!</string>
<string name="app_name">使用系统ContentProvider</string>
<string name="app_name">备份还原</string>
<string name="backup">备份</string>
<string name="restore">还原</string>
</resources>
106 changes: 0 additions & 106 deletions src/cn/youmay/Adapter.java

This file was deleted.

48 changes: 0 additions & 48 deletions src/cn/youmay/Main.java

This file was deleted.

20 changes: 20 additions & 0 deletions src/cn/youmay/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package cn.youmay;



import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;

public class MainActivity extends Activity{
private Button btnBackup;
private Button btnRestore;


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
btnBackup=(Button)findViewById(R.id.btnBackup);
btnRestore=(Button)findViewById(R.id.btnRestore);
}
}
11 changes: 0 additions & 11 deletions src/cn/youmay/Person.java

This file was deleted.

0 comments on commit dd65af3

Please sign in to comment.