2019-09-06 17:55:14 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?><!--
|
2018-10-14 15:20:05 +02:00
|
|
|
Copyright 2018 Thomas Schneider
|
|
|
|
|
2019-05-18 11:10:30 +02:00
|
|
|
This file is a part of Fedilab
|
2018-10-14 15:20:05 +02:00
|
|
|
|
|
|
|
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
|
2018-10-14 15:20:05 +02:00
|
|
|
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,
|
2018-10-14 15:20:05 +02:00
|
|
|
see <http://www.gnu.org/licenses>.
|
|
|
|
-->
|
|
|
|
|
2019-09-06 17:55:14 +02:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
2018-10-14 15:20:05 +02:00
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
2019-11-15 16:32:25 +01:00
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
2018-10-14 15:20:05 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2019-01-25 16:15:35 +01:00
|
|
|
android:keepScreenOn="true"
|
2019-05-18 11:10:30 +02:00
|
|
|
tools:context="app.fedilab.android.activities.PeertubeActivity">
|
2018-10-14 16:17:25 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<LinearLayout
|
2018-10-14 16:17:25 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:orientation="vertical">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<RelativeLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="0dp"
|
|
|
|
android:layout_weight="1">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-01-06 13:20:06 +01:00
|
|
|
<FrameLayout
|
|
|
|
android:id="@+id/main_media_frame"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_centerInParent="true"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:layout_gravity="center"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:background="#000000"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
2018-10-17 11:32:16 +02:00
|
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
|
|
app:layout_constraintRight_toRightOf="parent"
|
2019-11-15 16:32:25 +01:00
|
|
|
app:layout_constraintTop_toTopOf="parent">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-01-06 13:20:06 +01:00
|
|
|
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
|
|
|
|
android:id="@+id/media_video"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:gravity="center" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-10-14 18:54:04 +02:00
|
|
|
<app.fedilab.android.webview.CustomWebview
|
2019-01-06 16:06:18 +01:00
|
|
|
android:id="@+id/webview_video"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:visibility="gone" />
|
2019-01-06 13:20:06 +01:00
|
|
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<!-- Main Loader -->
|
2019-05-27 19:22:54 +02:00
|
|
|
<RelativeLayout
|
2018-10-17 11:32:16 +02:00
|
|
|
android:id="@+id/loader"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:gravity="center"
|
|
|
|
android:visibility="gone">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<ProgressBar
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:indeterminate="true" />
|
|
|
|
</RelativeLayout>
|
|
|
|
</RelativeLayout>
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<ScrollView
|
|
|
|
android:id="@+id/peertube_information_container"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="0dp"
|
|
|
|
android:layout_weight="2">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="20dp"
|
|
|
|
android:layout_marginLeft="20dp"
|
|
|
|
android:layout_marginEnd="20dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_marginRight="20dp"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:orientation="vertical">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/peertube_title"
|
|
|
|
android:layout_width="match_parent"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="5dp" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="5dp"
|
|
|
|
android:orientation="horizontal">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/peertube_view_count"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:layout_gravity="center_horizontal"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:layout_marginRight="10dp"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:drawableTop="@drawable/ic_visibility_peertube"
|
|
|
|
android:drawablePadding="5dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:gravity="center_horizontal"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:text="0"
|
|
|
|
tools:ignore="HardcodedText" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/peertube_like_count"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:layout_gravity="center_horizontal"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_marginStart="20dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:layout_marginRight="10dp"
|
2019-11-13 13:23:45 +01:00
|
|
|
android:drawableTop="@drawable/ic_thumb_up_peertube"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:drawablePadding="5dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:gravity="center_horizontal"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:text="0"
|
|
|
|
tools:ignore="HardcodedText" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/peertube_dislike_count"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:layout_gravity="center_horizontal"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:layout_marginRight="10dp"
|
2019-11-13 13:23:45 +01:00
|
|
|
android:drawableTop="@drawable/ic_thumb_down_peertube"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:drawablePadding="5dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:gravity="center_horizontal"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:text="0"
|
|
|
|
tools:ignore="HardcodedText" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-21 18:43:57 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/peertube_bookmark"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2018-10-21 18:43:57 +02:00
|
|
|
android:layout_gravity="center_horizontal"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:layout_marginRight="10dp"
|
2018-10-21 18:43:57 +02:00
|
|
|
android:drawableTop="@drawable/ic_bookmark_peertube_border"
|
|
|
|
android:drawablePadding="5dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:gravity="center_horizontal"
|
|
|
|
android:text="" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-05-27 19:22:54 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/peertube_playlist"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-05-27 19:22:54 +02:00
|
|
|
android:layout_gravity="center_horizontal"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:layout_marginRight="10dp"
|
2019-05-27 19:22:54 +02:00
|
|
|
android:drawableTop="@drawable/ic_list_peertube_activity"
|
|
|
|
android:drawablePadding="5dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:gravity="center_horizontal"
|
2018-10-21 18:43:57 +02:00
|
|
|
android:text=""
|
2019-11-15 16:32:25 +01:00
|
|
|
android:visibility="gone" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_weight="1"
|
2018-10-17 11:32:16 +02:00
|
|
|
tools:ignore="UselessLeaf" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/peertube_share"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:layout_gravity="center_horizontal"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:layout_marginRight="10dp"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:drawableTop="@drawable/ic_share_peertube"
|
|
|
|
android:drawablePadding="5dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:gravity="center_horizontal"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:text="@string/more_action_6"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:textSize="12sp" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/peertube_download"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:layout_gravity="center_horizontal"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:layout_marginRight="10dp"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:drawableTop="@drawable/ic_cloud_download_peertube"
|
|
|
|
android:drawablePadding="5dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:gravity="center_horizontal"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:text="@string/download"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:textSize="12sp" />
|
2018-10-17 11:32:16 +02:00
|
|
|
</LinearLayout>
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/peertube_description"
|
|
|
|
android:layout_width="match_parent"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="10dp" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-01-25 16:15:35 +01:00
|
|
|
<LinearLayout
|
|
|
|
android:id="@+id/write_comment_container"
|
|
|
|
android:layout_width="match_parent"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_height="wrap_content"
|
2019-01-25 16:15:35 +01:00
|
|
|
android:layout_gravity="center_vertical"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_marginTop="10dp"
|
2019-01-25 16:15:35 +01:00
|
|
|
android:orientation="horizontal"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:visibility="gone">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-01-25 16:15:35 +01:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="wrap_content"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="vertical">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-01-25 16:15:35 +01:00
|
|
|
<ImageView
|
|
|
|
android:id="@+id/my_pp"
|
|
|
|
android:layout_width="40dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_height="40dp"
|
|
|
|
android:contentDescription="@string/profile_picture" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-01-25 16:15:35 +01:00
|
|
|
<ImageView
|
|
|
|
android:id="@+id/send"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="30dp"
|
|
|
|
android:layout_height="30dp"
|
2019-01-25 16:15:35 +01:00
|
|
|
android:layout_marginTop="5dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:contentDescription="@string/send_comment"
|
2019-01-25 16:15:35 +01:00
|
|
|
android:src="@drawable/ic_send"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:visibility="gone" />
|
2019-01-25 16:15:35 +01:00
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="0dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_height="wrap_content"
|
2019-01-25 16:15:35 +01:00
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:layout_marginTop="5dp"
|
|
|
|
android:layout_marginBottom="5dp"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_weight="1"
|
|
|
|
android:orientation="vertical">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-01-25 16:15:35 +01:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/add_comment_read"
|
|
|
|
android:layout_width="match_parent"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/add_public_comment" />
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-01-25 16:15:35 +01:00
|
|
|
<EditText
|
|
|
|
android:id="@+id/add_comment_write"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:focusable="true"
|
|
|
|
android:focusableInTouchMode="true"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:hint="@string/add_public_comment"
|
|
|
|
android:inputType="textMultiLine"
|
2019-01-25 16:15:35 +01:00
|
|
|
android:maxLines="4"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:overScrollMode="always"
|
|
|
|
android:scrollbarStyle="insideInset"
|
|
|
|
android:scrollbars="vertical"
|
|
|
|
android:visibility="gone" />
|
2019-01-25 16:15:35 +01:00
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</LinearLayout>
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2019-06-11 19:38:26 +02:00
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
2018-10-17 11:32:16 +02:00
|
|
|
android:id="@+id/peertube_comments"
|
|
|
|
android:layout_width="match_parent"
|
2019-09-06 17:55:14 +02:00
|
|
|
android:layout_height="wrap_content" />
|
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<RelativeLayout
|
|
|
|
android:id="@+id/no_action"
|
|
|
|
android:layout_width="match_parent"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:visibility="gone">
|
2019-09-06 17:55:14 +02:00
|
|
|
|
2018-10-17 11:32:16 +02:00
|
|
|
<TextView
|
2018-10-20 15:16:57 +02:00
|
|
|
android:id="@+id/no_action_text"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_gravity="center"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:gravity="center"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:padding="10dp"
|
|
|
|
android:text="@string/no_comments"
|
2018-10-17 11:32:16 +02:00
|
|
|
android:textSize="25sp"
|
|
|
|
android:textStyle="italic|bold"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:typeface="serif" />
|
2018-10-17 11:32:16 +02:00
|
|
|
</RelativeLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|
2019-01-06 16:06:18 +01:00
|
|
|
<!-- View where the video will be shown when video goes fullscreen -->
|
|
|
|
<RelativeLayout
|
|
|
|
android:id="@+id/videoLayout"
|
|
|
|
android:layout_width="match_parent"
|
2019-11-15 16:32:25 +01:00
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:background="@color/black"
|
|
|
|
android:visibility="gone" />
|
2018-10-17 11:32:16 +02:00
|
|
|
</LinearLayout>
|
2019-06-11 19:38:26 +02:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|