mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
* fixed image not visible in top card issue(#2354) * some minor changes
This commit is contained in:
parent
f23cf3e7fa
commit
e82e3b9cb6
1 changed files with 5 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package fr.free.nrw.commons.upload;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
@ -8,6 +9,8 @@ import android.widget.ImageView;
|
|||
import com.facebook.drawee.view.SimpleDraweeView;
|
||||
import com.pedrogomez.renderers.Renderer;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
|
||||
class UploadThumbnailRenderer extends Renderer<UploadModel.UploadItem> {
|
||||
|
|
@ -40,7 +43,8 @@ class UploadThumbnailRenderer extends Renderer<UploadModel.UploadItem> {
|
|||
@Override
|
||||
public void render() {
|
||||
UploadModel.UploadItem content = getContent();
|
||||
background.setImageURI(content.mediaUri);
|
||||
Uri uri = Uri.parse(content.mediaUri.toString());
|
||||
background.setImageURI(Uri.fromFile(new File(String.valueOf(uri))));
|
||||
background.setAlpha(content.selected ? 1.0f : 0.5f);
|
||||
space.setVisibility(content.first ? View.VISIBLE : View.GONE);
|
||||
error.setVisibility(content.visited && content.error ? View.VISIBLE : View.GONE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue