fedilab-Android-App/app/src/main/res/layout/activity_media.xml

165 lines
6.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Thomas Schneider
This file is a part of Mastalab
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version.
Mastalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along with Mastalab; if not,
see <http://www.gnu.org/licenses>.
-->
<com.gw.swipeback.SwipeBackLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/swipeBackLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:directionMode="bottom"
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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_container_media">
<!-- Main Loader -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/loader"
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
>
<ProgressBar
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
android:indeterminate="false"
android:id="@+id/pbar_inf"
android:layout_width="match_parent"
android:max="100"
android:progress="0"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/loader_progress"
android:layout_width="match_parent"
android:textColor="@color/dark_text"
android:gravity="center"
android:textSize="12sp"
android:layout_gravity="center"
android:layout_height="wrap_content" />
</RelativeLayout>
<FrameLayout
android:layout_centerInParent="true"
android:id="@+id/media_picture_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Description is set dynamically -->
<com.github.chrisbanes.photoview.PhotoView
android:visibility="gone"
android:id="@+id/media_picture"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<TextView
android:visibility="gone"
android:gravity="center"
android:id="@+id/media_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dip"
android:layout_gravity="center_horizontal|bottom"
android:padding="12dp"
android:background="#AA000000"
android:textColor="#ffffffff"
/>
</FrameLayout>
<VideoView
android:layout_centerInParent="true"
android:visibility="gone"
android:id="@+id/media_video"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:visibility="gone"
android:layout_margin="5dp"
android:src="@drawable/ic_first_page"
android:id="@+id/media_prev"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_width="20dp"
android:layout_height="20dp"
android:contentDescription="@string/previous" />
<ImageView
android:visibility="gone"
android:layout_margin="5dp"
android:id="@+id/media_next"
android:src="@drawable/ic_last_page"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_width="20dp"
android:layout_height="20dp"
android:contentDescription="@string/next" />
<ImageButton
android:id="@+id/media_close"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
app:layout_anchorGravity="top|left"
android:layout_marginStart="10dp"
android:background="@color/transparent"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_close"
android:contentDescription="@string/close"
/>
<ImageButton
android:id="@+id/media_save"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
app:layout_anchorGravity="top|left"
android:layout_marginStart="10dp"
android:background="@color/transparent"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_save_white"
android:contentDescription="@string/download"
/>
<TextView
android:visibility="gone"
android:background="@drawable/media_message_border"
android:id="@+id/message_ready"
android:textColor="@color/dark_text"
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"
android:layout_height="40dp"/>
</RelativeLayout>
</com.gw.swipeback.SwipeBackLayout>