use of com.googlecode.flickrjandroid.photosets.Photoset in project glimmr by brk3.
the class PhotosetViewerActivity method onRestoreInstanceState.
@Override
protected void onRestoreInstanceState(Bundle bundle) {
super.onRestoreInstanceState(bundle);
Gson gson = new Gson();
if (mPhotoset == null) {
String json = bundle.getString(KEY_PHOTOSET);
if (json != null) {
mPhotoset = gson.fromJson(json, Photoset.class);
} else {
Log.e(TAG, "No photoset found in savedInstanceState");
}
}
if (mUser == null) {
String json = bundle.getString(KEY_USER);
if (json != null) {
mUser = new Gson().fromJson(json, User.class);
} else {
Log.e(TAG, "No user found in savedInstanceState");
}
}
mPhotoset.setOwner(mUser);
initViewPager();
updateBottomOverlay();
}