Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String json = sharedPrefs.getString("buttons", null);
- if (json != null) {
- Type type = new TypeToken<ArrayList<ButtonToNotification>>() {
- }.getType();
- MySingleton.getOurInstance().getButtonToNotifications().clear();
- ArrayList<ButtonToNotification> arrayList = gson.fromJson(json, type);
- for (int i = 0; i < arrayList.size(); i++) {
- MySingleton.getOurInstance().getButtonToNotifications().add(arrayList.get(i));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement