程式語言摘要 > Android

<<SharedPreferences>>

(1/1)

admin:
https://developer.android.com/reference/android/content/SharedPreferences.html
程式碼: [Select]>>>>    private static final String data = "DATA";
    private static final String nameField = "NAME";
    private static final String phoneField = "PHONE";
    private static final String sexField = "SEX";
private SharedPreferences settings;
String strA = settings.getString(nameField, "");
settings.edit()
                .putString(nameField, strA)
                .putString(phoneField, strB)
                .putString(sexField, strC)
                .commit();
<<<<

導覽

[0] 文章列表