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

284 lines
12 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Thomas Schneider
2019-05-18 11:10:30 +02:00
This file is a part of Fedilab
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.
2019-05-18 11:10:30 +02:00
Fedilab 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.
2019-05-18 11:10:30 +02:00
You should have received a copy of the GNU General Public License along with Fedilab; 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"
2018-09-26 17:25:39 +02:00
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">
2018-02-09 14:56:57 +01:00
2017-12-22 16:48:37 +01:00
<!-- Main Loader -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/loader"
android:layout_alignParentTop="true"
2017-11-07 11:09:09 +01:00
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>
2019-02-05 18:05:21 +01:00
<FrameLayout
android:layout_centerInParent="true"
android:id="@+id/media_webview_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:layout_width="match_parent"
android:visibility="gone"
android:id="@+id/webview_video"
android:layout_height="match_parent"/>
</FrameLayout>
<FrameLayout
android:layout_centerInParent="true"
android:id="@+id/media_picture_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
2018-12-10 09:22:50 +01:00
<!-- Description is set dynamically -->
2019-03-31 13:52:48 +02:00
<com.github.chrisbanes.photoview.PhotoView
android:visibility="gone"
android:id="@+id/media_picture"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
2018-12-10 09:22:50 +01:00
/>
<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="62dp"
android:layout_gravity="center_horizontal|bottom"
android:padding="12dp"
android:background="#AA000000"
android:textColor="#ffffffff"
/>
</FrameLayout>
2019-06-26 18:48:07 +02:00
<RelativeLayout
android:id="@+id/content_audio"
android:visibility="gone"
2019-06-26 18:48:07 +02:00
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:orientation="vertical">
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-10dp"
android:textSize="20sp"
android:textColor="@android:color/white"
android:fontFamily="sans-serif-light"
android:visibility="invisible"/>
<TextView
android:id="@+id/timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="60sp"
android:textColor="@android:color/white"
android:fontFamily="sans-serif-thin"
android:text="00:00:00"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/aar_footer_height"
android:layout_alignParentBottom="true">
<ImageButton
android:id="@+id/play"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerVertical="true"
android:layout_centerInParent="true"
android:layout_marginTop="50dp"
android:padding="10dp"
android:scaleType="fitCenter"
android:src="@drawable/aar_ic_play"
android:onClick="togglePlaying"
style="@style/Widget.AppCompat.Button.Borderless"/>
</RelativeLayout>
</RelativeLayout>
2019-01-18 12:05:47 +01:00
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:visibility="gone"
android:id="@+id/media_video"
2019-01-18 12:05:47 +01:00
android:layout_centerInParent="true"
2017-12-22 16:48:37 +01:00
android:layout_width="match_parent"
2019-01-18 12:05:47 +01:00
android:layout_height="match_parent"
/>
2019-03-29 10:39:21 +01:00
<RelativeLayout
android:layout_width="match_parent"
2018-09-26 14:53:41 +02:00
android:layout_height="wrap_content"
android:background="@color/transparent_grey"
android:id="@+id/action_bar_container"
android:paddingTop="16dp">
2019-01-26 11:59:37 +01:00
<ImageButton
android:id="@+id/media_close"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
2019-01-26 11:59:37 +01:00
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
2019-03-29 10:39:21 +01:00
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/transparent"
android:contentDescription="@string/close"
2019-03-29 10:39:21 +01:00
android:scaleType="fitXY"
android:src="@drawable/ic_close"
app:layout_anchorGravity="top|left" />
2019-01-26 11:59:37 +01:00
<LinearLayout
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
app:layout_anchorGravity="top|left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageButton
2019-03-31 13:52:48 +02:00
android:id="@+id/media_save"
android:scaleType="fitXY"
android:layout_marginStart="20dp"
android:background="@color/transparent"
2019-03-31 13:52:48 +02:00
android:layout_marginLeft="20dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_width="30dp"
android:layout_height="30dp"
2019-03-31 13:52:48 +02:00
android:src="@drawable/ic_save_white"
android:contentDescription="@string/download"
/>
<ImageButton
2019-03-31 13:52:48 +02:00
android:id="@+id/media_share"
app:layout_anchorGravity="top|left"
android:layout_marginStart="10dp"
android:background="@color/transparent"
2019-03-31 13:52:48 +02:00
android:layout_marginLeft="10dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginRight="15dp"
2019-03-31 13:52:48 +02:00
android:layout_marginEnd="10dp"
android:layout_width="30dp"
android:layout_height="30dp"
2019-03-31 13:52:48 +02:00
android:src="@drawable/ic_share_media"
android:scaleType="fitXY"
android:contentDescription="@string/share"
/>
</LinearLayout>
</RelativeLayout>
2019-01-26 11:59:37 +01:00
<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" />
2018-02-11 07:54:28 +01:00
<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"
2018-02-11 07:54:28 +01:00
android:layout_marginBottom="40dp"
android:layout_width="match_parent"
android:layout_height="40dp"/>
2018-02-09 14:56:57 +01:00
</RelativeLayout>
</com.gw.swipeback.SwipeBackLayout>