Added panoramio request-friendliness onCreateView.
parent
fcf9f75aee
commit
085db85ce0
|
@ -116,14 +116,16 @@ public class HomeFragment extends Fragment {
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
lg.trace("Saved instance state {}", savedInstanceState);
|
lg.trace("Saved instance state {}", savedInstanceState);
|
||||||
if (savedInstanceState == null) {
|
if (photos == null) {
|
||||||
lg.trace("Saved instance state is null");
|
if (savedInstanceState == null) {
|
||||||
photos = new ArrayList<>();
|
lg.trace("Saved instance state is null");
|
||||||
}
|
photos = new ArrayList<>();
|
||||||
else {
|
}
|
||||||
final Serializable serializable = savedInstanceState.getSerializable(PHOTO_LIST);
|
else {
|
||||||
lg.trace("Photo list serializable {}", serializable);
|
final Serializable serializable = savedInstanceState.getSerializable(PHOTO_LIST);
|
||||||
photos = (ArrayList<PanoramioImageInfo>) serializable;
|
lg.trace("Photo list serializable {}", serializable);
|
||||||
|
photos = (ArrayList<PanoramioImageInfo>) serializable;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
locations.setAdapter(new PanoramioAdapter(getActivity(), R.layout.location_item, photos));
|
locations.setAdapter(new PanoramioAdapter(getActivity(), R.layout.location_item, photos));
|
||||||
|
|
Loading…
Reference in New Issue