mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Do not crash multiple uploads screen on screen rotate
This commit is contained in:
parent
154a559b86
commit
0fe1ef73e5
1 changed files with 10 additions and 0 deletions
|
|
@ -111,6 +111,10 @@ public class MultipleUploadListFragment extends SherlockFragment {
|
|||
photosGrid = (GridView)view.findViewById(R.id.multipleShareBackground);
|
||||
baseTitle = (EditText)view.findViewById(R.id.multipleBaseTitle);
|
||||
|
||||
if(savedInstanceState != null) {
|
||||
setData(savedInstanceState.<Contribution>getParcelableArrayList("photosData"));
|
||||
}
|
||||
|
||||
baseTitle.addTextChangedListener(new TextWatcher() {
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
|
||||
|
|
@ -151,6 +155,12 @@ public class MultipleUploadListFragment extends SherlockFragment {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putParcelableArrayList("photosData", photosList);
|
||||
}
|
||||
|
||||
public void setData(ArrayList<Contribution> photosList) {
|
||||
if(this.photosList == null) {
|
||||
photosAdapter = new PhotoDisplayAdapter(photosList);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue