private void readUserFromSharedPreference() { SharedPreferences sp = PrefUtil.getPref(context, MYPREFS); user.id = PrefUtil.getString(sp, KEY_ID); user.name = PrefUtil.getString(sp, KEY_USERNAME); user.email = PrefUtil.getString(sp, KEY_EMAIL); user.point = PrefUtil.getInt(sp, KEY_POINT); }
public void setUser(UserTemp temp) { User user = new User(); user.id = temp.id; user.name = temp.name; user.phone1 = temp.tel; user.phone2 = temp.tel2; user.email = temp.email; user.addressDefault = temp.address1; user.addressDetail = temp.address2; user.postCode1 = temp.zipcode.substring(0, 3); user.postCode2 = temp.zipcode.substring(4, 7); user.point = temp.goldcoin; setUser(user); }