diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java
index d2bbbf1ea..cbb803355 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java
@@ -2316,11 +2316,19 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
holder.status_prev1_play_h.setVisibility(View.GONE);
else
holder.status_prev1_play.setVisibility(View.GONE);
- else
- if( fullAttachement)
+ else {
+ if( attachment.getType().toLowerCase().equals("video")) {
+ holder.status_prev1_play_h.setImageResource(R.drawable.ic_video_preview);
+ holder.status_prev1_play.setImageResource(R.drawable.ic_video_preview);
+ }else if( attachment.getType().toLowerCase().equals("gifv")) {
+ holder.status_prev1_play.setImageResource(R.drawable.ic_gif_preview);
+ holder.status_prev1_play_h.setImageResource(R.drawable.ic_gif_preview);
+ }
+ if (fullAttachement)
holder.status_prev1_play_h.setVisibility(View.VISIBLE);
else
holder.status_prev1_play.setVisibility(View.VISIBLE);
+ }
}else if( i == 1) {
imageView = fullAttachement?holder.status_prev2_h:holder.status_prev2;
if( attachment.getType().toLowerCase().equals("image") || attachment.getType().toLowerCase().equals("unknown"))
@@ -2328,11 +2336,19 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
holder.status_prev2_play_h.setVisibility(View.GONE);
else
holder.status_prev2_play.setVisibility(View.GONE);
- else
- if( fullAttachement)
+ else {
+ if( attachment.getType().toLowerCase().equals("video")) {
+ holder.status_prev2_play_h.setImageResource(R.drawable.ic_video_preview);
+ holder.status_prev2_play.setImageResource(R.drawable.ic_video_preview);
+ }else if( attachment.getType().toLowerCase().equals("gifv")) {
+ holder.status_prev2_play_h.setImageResource(R.drawable.ic_gif_preview);
+ holder.status_prev2_play.setImageResource(R.drawable.ic_gif_preview);
+ }
+ if (fullAttachement)
holder.status_prev2_play_h.setVisibility(View.VISIBLE);
else
holder.status_prev2_play.setVisibility(View.VISIBLE);
+ }
}else if(i == 2) {
imageView = fullAttachement?holder.status_prev3_h:holder.status_prev3;
if( attachment.getType().toLowerCase().equals("image") || attachment.getType().toLowerCase().equals("unknown"))
@@ -2340,11 +2356,19 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
holder.status_prev3_play_h.setVisibility(View.GONE);
else
holder.status_prev3_play.setVisibility(View.GONE);
- else
- if( fullAttachement)
+ else {
+ if( attachment.getType().toLowerCase().equals("video")) {
+ holder.status_prev3_play_h.setImageResource(R.drawable.ic_video_preview);
+ holder.status_prev3_play.setImageResource(R.drawable.ic_video_preview);
+ }else if( attachment.getType().toLowerCase().equals("gifv")) {
+ holder.status_prev3_play_h.setImageResource(R.drawable.ic_gif_preview);
+ holder.status_prev3_play.setImageResource(R.drawable.ic_gif_preview);
+ }
+ if (fullAttachement)
holder.status_prev3_play_h.setVisibility(View.VISIBLE);
else
holder.status_prev3_play.setVisibility(View.VISIBLE);
+ }
}else {
imageView = fullAttachement?holder.status_prev4_h:holder.status_prev4;
if( attachment.getType().toLowerCase().equals("image") || attachment.getType().toLowerCase().equals("unknown"))
@@ -2352,11 +2376,19 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
holder.status_prev4_play_h.setVisibility(View.GONE);
else
holder.status_prev4_play.setVisibility(View.GONE);
- else
- if( fullAttachement)
+ else {
+ if( attachment.getType().toLowerCase().equals("video")) {
+ holder.status_prev4_play_h.setImageResource(R.drawable.ic_video_preview);
+ holder.status_prev4_play.setImageResource(R.drawable.ic_video_preview);
+ }else if( attachment.getType().toLowerCase().equals("gifv")) {
+ holder.status_prev4_play_h.setImageResource(R.drawable.ic_gif_preview);
+ holder.status_prev4_play.setImageResource(R.drawable.ic_gif_preview);
+ }
+ if (fullAttachement)
holder.status_prev4_play_h.setVisibility(View.VISIBLE);
else
holder.status_prev4_play.setVisibility(View.VISIBLE);
+ }
}
String url = attachment.getPreview_url();
diff --git a/app/src/main/res/drawable/ic_gif_preview.xml b/app/src/main/res/drawable/ic_gif_preview.xml
new file mode 100644
index 000000000..1fa039ce1
--- /dev/null
+++ b/app/src/main/res/drawable/ic_gif_preview.xml
@@ -0,0 +1,13 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_video_preview.xml b/app/src/main/res/drawable/ic_video_preview.xml
new file mode 100644
index 000000000..bb38810de
--- /dev/null
+++ b/app/src/main/res/drawable/ic_video_preview.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/res/layout/drawer_status.xml b/app/src/main/res/layout/drawer_status.xml
index a2925d9dd..9bb1ee611 100644
--- a/app/src/main/res/layout/drawer_status.xml
+++ b/app/src/main/res/layout/drawer_status.xml
@@ -439,9 +439,9 @@
android:id="@+id/status_prev1_play_h"
android:visibility="gone"
android:layout_centerInParent="true"
- android:layout_width="20dp"
+ android:layout_width="30dp"
android:src="@drawable/ic_play_arrow"
- android:layout_height="20dp"
+ android:layout_height="30dp"
android:contentDescription="@string/play_video" />
@@ -493,9 +493,9 @@
android:id="@+id/status_prev3_play_h"
android:visibility="gone"
android:layout_centerInParent="true"
- android:layout_width="20dp"
+ android:layout_width="30dp"
android:src="@drawable/ic_play_arrow"
- android:layout_height="20dp"
+ android:layout_height="30dp"
android:contentDescription="@string/play_video" />
@@ -557,9 +557,9 @@
android:id="@+id/status_prev1_play"
android:visibility="gone"
android:layout_centerInParent="true"
- android:layout_width="20dp"
+ android:layout_width="30dp"
android:src="@drawable/ic_play_arrow"
- android:layout_height="20dp" />
+ android:layout_height="30dp" />
@@ -620,10 +620,10 @@
diff --git a/app/src/main/res/layout/drawer_status_compact.xml b/app/src/main/res/layout/drawer_status_compact.xml
index aa38f84d9..be2771de0 100644
--- a/app/src/main/res/layout/drawer_status_compact.xml
+++ b/app/src/main/res/layout/drawer_status_compact.xml
@@ -415,9 +415,9 @@
android:id="@+id/status_prev1_play_h"
android:visibility="gone"
android:layout_centerInParent="true"
- android:layout_width="20dp"
+ android:layout_width="30dp"
android:src="@drawable/ic_play_arrow"
- android:layout_height="20dp"
+ android:layout_height="30dp"
android:contentDescription="@string/play_video" />
@@ -471,9 +471,9 @@
android:id="@+id/status_prev3_play_h"
android:visibility="gone"
android:layout_centerInParent="true"
- android:layout_width="20dp"
+ android:layout_width="30dp"
android:src="@drawable/ic_play_arrow"
- android:layout_height="20dp"
+ android:layout_height="30dp"
android:contentDescription="@string/play_video" />
@@ -534,9 +534,9 @@
android:id="@+id/status_prev1_play"
android:visibility="gone"
android:layout_centerInParent="true"
- android:layout_width="20dp"
+ android:layout_width="30dp"
android:src="@drawable/ic_play_arrow"
- android:layout_height="20dp"
+ android:layout_height="30dp"
android:contentDescription="@string/play_video" />
@@ -598,10 +598,10 @@
diff --git a/app/src/main/res/layout/drawer_status_focused.xml b/app/src/main/res/layout/drawer_status_focused.xml
index 65f354c04..535ef1ca0 100644
--- a/app/src/main/res/layout/drawer_status_focused.xml
+++ b/app/src/main/res/layout/drawer_status_focused.xml
@@ -343,9 +343,9 @@
android:id="@+id/status_prev1_play_h"
android:visibility="gone"
android:layout_centerInParent="true"
- android:layout_width="20dp"
+ android:layout_width="30dp"
android:src="@drawable/ic_play_arrow"
- android:layout_height="20dp"
+ android:layout_height="30dp"
android:contentDescription="@string/play_video" />
@@ -397,9 +397,9 @@
android:id="@+id/status_prev3_play_h"
android:visibility="gone"
android:layout_centerInParent="true"
- android:layout_width="20dp"
+ android:layout_width="30dp"
android:src="@drawable/ic_play_arrow"
- android:layout_height="20dp"
+ android:layout_height="30dp"
android:contentDescription="@string/play_video" />
@@ -460,9 +460,9 @@
android:id="@+id/status_prev1_play"
android:visibility="gone"
android:layout_centerInParent="true"
- android:layout_width="20dp"
+ android:layout_width="30dp"
android:src="@drawable/ic_play_arrow"
- android:layout_height="20dp"
+ android:layout_height="30dp"
android:contentDescription="@string/play_video" />
@@ -524,10 +524,10 @@