Fix issue #391 - Add an icon when a media description is available.
This commit is contained in:
parent
209d698223
commit
88e2f0cb7c
|
@ -1255,7 +1255,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
focusX = statusToDeal.media_attachments.get(0).meta.focus.x;
|
||||
focusY = statusToDeal.media_attachments.get(0).meta.focus.y;
|
||||
}
|
||||
|
||||
if (statusToDeal.media_attachments.get(0).description != null && !statusToDeal.media_attachments.get(0).description.isEmpty()) {
|
||||
layoutMediaBinding.viewDescription.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
layoutMediaBinding.viewDescription.setVisibility(View.GONE);
|
||||
}
|
||||
if (!mediaObfuscated(statusToDeal) || expand_media) {
|
||||
layoutMediaBinding.viewHide.setImageResource(R.drawable.ic_baseline_visibility_24);
|
||||
RequestBuilder<Drawable> requestBuilder = Glide.with(layoutMediaBinding.media.getContext())
|
||||
|
@ -1329,6 +1333,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
} else {
|
||||
layoutMediaBinding.playMusic.setVisibility(View.GONE);
|
||||
}
|
||||
if (attachment.description != null && !attachment.description.isEmpty()) {
|
||||
layoutMediaBinding.viewDescription.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
layoutMediaBinding.viewDescription.setVisibility(View.GONE);
|
||||
}
|
||||
lp.setMargins(0, 0, (int) Helper.convertDpToPixel(5, context), 0);
|
||||
if (!mediaObfuscated(statusToDeal) || expand_media) {
|
||||
layoutMediaBinding.viewHide.setImageResource(R.drawable.ic_baseline_visibility_24);
|
||||
|
|
|
@ -38,5 +38,14 @@
|
|||
android:contentDescription="@string/visibility"
|
||||
android:src="@drawable/ic_baseline_visibility_24" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/view_description"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="5dp"
|
||||
android:contentDescription="@string/description"
|
||||
android:src="@drawable/ic_outline_note_alt_24"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue