This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.androidlab; | |
| import android.os.Bundle; | |
| import android.app.Activity; | |
| import android.app.AlertDialog; | |
| import android.content.Context; | |
| import android.content.DialogInterface; | |
| import android.view.Menu; | |
| import android.view.View; | |
| import android.view.View.OnClickListener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="fill_parent" | |
| android:layout_height="fill_parent" | |
| android:orientation="vertical" > | |
| <EditText | |
| android:id="@+id/editTextName" | |
| android:layout_width="fill_parent" | |
| android:layout_height="wrap_content" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.androidlab; | |
| import android.os.Bundle; | |
| import android.app.Activity; | |
| import android.content.SharedPreferences; | |
| import android.view.View; | |
| import android.widget.EditText; | |
| import android.widget.Toast; | |
| public class MainActivity extends Activity { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <menu xmlns:android="http://schemas.android.com/apk/res/android" > | |
| <item | |
| android:id="@+id/menuSetting" | |
| android:title="Setting"/> | |
| </menu> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > | |
| <PreferenceCategory android:title="Store" > | |
| <ListPreference | |
| android:entries="@array/listStore" | |
| android:entryValues="@array/listStoreReturn" | |
| android:key="prefStore" | |
| android:title="Where do you want to store?" /> | |
| </PreferenceCategory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.androidlab; | |
| import android.os.Bundle; | |
| import android.preference.PreferenceActivity; | |
| public class SettingActivity extends PreferenceActivity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| // TODO Auto-generated method stub | |
| super.onCreate(savedInstanceState); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.example.androidlab" | |
| android:versionCode="1" | |
| android:versionName="1.0" > | |
| <uses-sdk | |
| android:minSdkVersion="11" | |
| android:targetSdkVersion="14" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <string-array name="listStore"> | |
| <item>Internal Storage</item> | |
| <item>External Storage</item> | |
| </string-array> | |
| <string-array name="listStoreReturn"> | |
| <item>Internal Storage has been set!</item> | |
| <item>External Storage has been set!</item> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.androidlab; | |
| import android.app.Activity; | |
| import android.content.Intent; | |
| import android.content.SharedPreferences; | |
| import android.os.Bundle; | |
| import android.preference.PreferenceManager; | |
| import android.view.Menu; | |
| import android.view.MenuItem; | |
| import android.widget.Toast; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.androidlab; | |
| public class User { | |
| // private variables | |
| int id; | |
| String name; | |
| // Empty constructor | |
| public User() { | |
| } |