diff options
author | tom79 <tschneider.ac@gmail.com> | 2019-05-07 19:20:00 +0200 |
---|---|---|
committer | tom79 <tschneider.ac@gmail.com> | 2019-05-07 19:20:00 +0200 |
commit | 71b2f15483c42a6c7bcd0857b7b508962392750e (patch) | |
tree | b733486483a40df218270a323149f263746d7605 /app | |
parent | 9476e2e8f376c4f369f272142fad6a3ada81b98d (diff) |
Fix for not cropped media
Diffstat (limited to 'app')
5 files changed, 47 insertions, 16 deletions
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 a8fac668e..01e9b284e 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 @@ -1537,6 +1537,14 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct } } + + if( fullAttachement){ + int heigh = holder.status_horizontal_document_container.getHeight(); + RelativeLayout.LayoutParams rel_btn = new RelativeLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, heigh); + holder.status_show_more.setLayoutParams(rel_btn); + } + if (status.getReblog() == null) { if (status.getMedia_attachments().size() < 1) { holder.status_horizontal_document_container.setVisibility(View.GONE); @@ -2948,6 +2956,9 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct resource = Bitmap.createScaledBitmap(resource, width, height, false); } imageView.setImageBitmap(resource); + notifyStatusChanged(status); + + } }); } diff --git a/app/src/main/res/layout/drawer_status.xml b/app/src/main/res/layout/drawer_status.xml index bcab804b9..9c69e4ad7 100644 --- a/app/src/main/res/layout/drawer_status.xml +++ b/app/src/main/res/layout/drawer_status.xml @@ -672,14 +672,19 @@ android:visibility="gone" android:id="@+id/status_show_more" android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_centerInParent="true"> + android:layout_height="200dp" + > <TextView android:textSize="20sp" android:gravity="center" android:id="@+id/show_more_content" - android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_gravity="center" + android:layout_centerInParent="true" + android:padding="12dp" + android:background="#AA000000" + android:textColor="#ffffffff" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> </RelativeLayout> </RelativeLayout> diff --git a/app/src/main/res/layout/drawer_status_compact.xml b/app/src/main/res/layout/drawer_status_compact.xml index 12e4c262c..b06df6022 100644 --- a/app/src/main/res/layout/drawer_status_compact.xml +++ b/app/src/main/res/layout/drawer_status_compact.xml @@ -633,14 +633,19 @@ android:visibility="gone" android:id="@+id/status_show_more" android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_centerInParent="true"> + android:layout_height="200dp" + > <TextView android:textSize="20sp" android:gravity="center" android:id="@+id/show_more_content" - android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_gravity="center" + android:layout_centerInParent="true" + android:padding="12dp" + android:background="#AA000000" + android:textColor="#ffffffff" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> </RelativeLayout> </RelativeLayout> </LinearLayout> diff --git a/app/src/main/res/layout/drawer_status_console.xml b/app/src/main/res/layout/drawer_status_console.xml index 2315e8dc6..bdfe79f2a 100644 --- a/app/src/main/res/layout/drawer_status_console.xml +++ b/app/src/main/res/layout/drawer_status_console.xml @@ -633,14 +633,19 @@ android:visibility="gone" android:id="@+id/status_show_more" android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_centerInParent="true"> + android:layout_height="200dp" + > <TextView android:textSize="20sp" android:gravity="center" android:id="@+id/show_more_content" - android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_gravity="center" + android:layout_centerInParent="true" + android:padding="12dp" + android:background="#AA000000" + android:textColor="#ffffffff" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> </RelativeLayout> </RelativeLayout> </LinearLayout> diff --git a/app/src/main/res/layout/drawer_status_focused.xml b/app/src/main/res/layout/drawer_status_focused.xml index 95ffcbc5f..73f0947b1 100644 --- a/app/src/main/res/layout/drawer_status_focused.xml +++ b/app/src/main/res/layout/drawer_status_focused.xml @@ -557,14 +557,19 @@ android:visibility="gone" android:id="@+id/status_show_more" android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_centerInParent="true"> + android:layout_height="200dp" + > <TextView android:textSize="20sp" android:gravity="center" android:id="@+id/show_more_content" - android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_gravity="center" + android:layout_centerInParent="true" + android:padding="12dp" + android:background="#AA000000" + android:textColor="#ffffffff" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> </RelativeLayout> </RelativeLayout> </LinearLayout> |