mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Merge pull request #681 from dbrant/crash2
Fix crash when uploading multiple photos.
This commit is contained in:
commit
40c1ea375a
2 changed files with 7 additions and 10 deletions
|
|
@ -24,7 +24,6 @@ class ContributionsListAdapter extends CursorAdapter {
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIXME: Potential cause of wrong image display bug
|
|
||||||
@Override
|
@Override
|
||||||
public void bindView(View view, Context context, Cursor cursor) {
|
public void bindView(View view, Context context, Cursor cursor) {
|
||||||
final ContributionViewHolder views = (ContributionViewHolder)view.getTag();
|
final ContributionViewHolder views = (ContributionViewHolder)view.getTag();
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,12 @@ import android.widget.GridView;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import fr.free.nrw.commons.MediaWikiImageView;
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
|
|
||||||
import fr.free.nrw.commons.R;
|
import fr.free.nrw.commons.R;
|
||||||
import fr.free.nrw.commons.contributions.Contribution;
|
import fr.free.nrw.commons.contributions.Contribution;
|
||||||
import fr.free.nrw.commons.media.MediaDetailPagerFragment;
|
import fr.free.nrw.commons.media.MediaDetailPagerFragment;
|
||||||
|
|
||||||
|
|
||||||
public class MultipleUploadListFragment extends Fragment {
|
public class MultipleUploadListFragment extends Fragment {
|
||||||
|
|
||||||
public interface OnMultipleUploadInitiatedHandler {
|
public interface OnMultipleUploadInitiatedHandler {
|
||||||
|
|
@ -47,12 +47,10 @@ public class MultipleUploadListFragment extends Fragment {
|
||||||
private boolean imageOnlyMode;
|
private boolean imageOnlyMode;
|
||||||
|
|
||||||
private static class UploadHolderView {
|
private static class UploadHolderView {
|
||||||
Uri imageUri;
|
private Uri imageUri;
|
||||||
|
private SimpleDraweeView image;
|
||||||
MediaWikiImageView image;
|
private TextView title;
|
||||||
TextView title;
|
private RelativeLayout overlay;
|
||||||
|
|
||||||
RelativeLayout overlay;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class PhotoDisplayAdapter extends BaseAdapter {
|
private class PhotoDisplayAdapter extends BaseAdapter {
|
||||||
|
|
@ -79,7 +77,7 @@ public class MultipleUploadListFragment extends Fragment {
|
||||||
if(view == null) {
|
if(view == null) {
|
||||||
view = getLayoutInflater(null).inflate(R.layout.layout_upload_item, null);
|
view = getLayoutInflater(null).inflate(R.layout.layout_upload_item, null);
|
||||||
holder = new UploadHolderView();
|
holder = new UploadHolderView();
|
||||||
holder.image = (MediaWikiImageView) view.findViewById(R.id.uploadImage);
|
holder.image = (SimpleDraweeView) view.findViewById(R.id.uploadImage);
|
||||||
holder.title = (TextView) view.findViewById(R.id.uploadTitle);
|
holder.title = (TextView) view.findViewById(R.id.uploadTitle);
|
||||||
holder.overlay = (RelativeLayout) view.findViewById(R.id.uploadOverlay);
|
holder.overlay = (RelativeLayout) view.findViewById(R.id.uploadOverlay);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue