diff options
author | Len Chan <lenchan139@tto.moe> | 2019-03-31 17:48:47 +0800 |
---|---|---|
committer | Len Chan <lenchan139@tto.moe> | 2019-03-31 17:48:47 +0800 |
commit | e06a3bad731272c2b2c17d4e3f8108cc3963f163 (patch) | |
tree | b7a37c479997671d8664209a45143476819e78bc /app/src/main/res/layout | |
parent | 749f63f1d4005b6c619710466174f0a59a575513 (diff) |
fullscrren mode by click on activity_media
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_media.xml | 83 |
1 files changed, 44 insertions, 39 deletions
diff --git a/app/src/main/res/layout/activity_media.xml b/app/src/main/res/layout/activity_media.xml index d546e6341..21cce790b 100644 --- a/app/src/main/res/layout/activity_media.xml +++ b/app/src/main/res/layout/activity_media.xml @@ -24,7 +24,6 @@ app:isSwipeFromEdge="true" app:maskAlpha="125" app:swipeBackFactor="0.5"> - <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" @@ -32,7 +31,6 @@ android:id="@+id/main_container_media"> - <!-- Main Loader --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/loader" @@ -77,11 +75,12 @@ android:layout_width="match_parent" android:layout_height="match_parent"> <!-- Description is set dynamically --> - <com.github.chrisbanes.photoview.PhotoView + <fr.gouv.etalab.mastodon.helper.CustomPhotoView android:visibility="gone" android:id="@+id/media_picture" android:layout_width="match_parent" android:layout_height="match_parent" + android:adjustViewBounds="true" /> <TextView android:visibility="gone" @@ -89,7 +88,7 @@ android:id="@+id/media_description" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="20dip" + android:layout_marginBottom="62dp" android:layout_gravity="center_horizontal|bottom" android:padding="12dp" android:background="#AA000000" @@ -104,44 +103,12 @@ android:layout_height="match_parent" /> - <ImageView - android:id="@+id/media_prev" - android:layout_width="20dp" - android:layout_height="20dp" - android:layout_alignParentStart="true" - android:layout_alignParentLeft="true" - android:layout_centerVertical="true" - android:layout_marginStart="5dp" - android:layout_marginLeft="5dp" - android:layout_marginTop="5dp" - android:layout_marginEnd="5dp" - android:layout_marginRight="5dp" - android:layout_marginBottom="5dp" - android:contentDescription="@string/previous" - android:src="@drawable/ic_first_page" - android:visibility="gone" /> - - <ImageView - android:id="@+id/media_next" - android:layout_width="20dp" - android:layout_height="30dp" - android:layout_alignParentEnd="true" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:layout_marginStart="5dp" - android:layout_marginLeft="5dp" - android:layout_marginTop="5dp" - android:layout_marginEnd="5dp" - android:layout_marginRight="5dp" - android:layout_marginBottom="5dp" - android:contentDescription="@string/next" - android:src="@drawable/ic_last_page" - android:visibility="gone" /> - <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/transparent_grey"> + android:background="@color/transparent_grey" + android:id="@+id/action_bar_container" + android:paddingTop="16dp"> <ImageButton android:id="@+id/media_close" android:layout_width="35dp" @@ -202,6 +169,43 @@ </LinearLayout> </RelativeLayout> + <ImageView + android:id="@+id/media_prev" + android:layout_width="30dp" + android:layout_height="50dp" + android:layout_alignParentStart="true" + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:layout_marginStart="5dp" + android:layout_marginLeft="5dp" + android:layout_marginTop="5dp" + android:layout_marginEnd="5dp" + android:layout_marginRight="5dp" + android:layout_marginBottom="5dp" + android:background="@color/transparent_grey" + android:tint="@color/white" + android:contentDescription="@string/previous" + android:src="@drawable/ic_first_page" + android:visibility="gone" /> + + <ImageView + android:id="@+id/media_next" + android:layout_width="30dp" + android:layout_height="50dp" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:layout_marginStart="5dp" + android:layout_marginLeft="5dp" + android:layout_marginTop="5dp" + android:layout_marginEnd="5dp" + android:layout_marginRight="5dp" + android:layout_marginBottom="5dp" + android:background="@color/transparent_grey" + android:contentDescription="@string/next" + android:src="@drawable/ic_last_page" + android:visibility="gone" /> + <TextView android:visibility="gone" @@ -211,6 +215,7 @@ android:text="@string/media_ready" android:gravity="center" android:textSize="14sp" + android:layout_alignBottom="@+id/media_picture_container" android:layout_marginBottom="40dp" android:layout_width="match_parent" |