494 lines
26 KiB
XML
494 lines
26 KiB
XML
<?xml version="1.0" encoding="utf-8"?><!--
|
|
Copyright 2020 Thomas Schneider
|
|
|
|
This file is a part of TubeLab
|
|
|
|
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.
|
|
|
|
TubeLab 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 TubeLab; if not,
|
|
see <http://www.gnu.org/licenses>.
|
|
-->
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:keepScreenOn="true"
|
|
tools:context=".PeertubeActivity">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical">
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/video_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1">
|
|
|
|
<FrameLayout
|
|
android:id="@+id/main_media_frame"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_centerInParent="true"
|
|
android:layout_gravity="center"
|
|
android:background="#000000"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<com.google.android.exoplayer2.ui.PlayerView
|
|
android:id="@+id/media_video"
|
|
android:animateLayoutChanges="true"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center" />
|
|
|
|
<app.fedilab.fedilabtube.webview.CustomWebview
|
|
android:id="@+id/webview_video"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:visibility="gone" />
|
|
|
|
</FrameLayout>
|
|
|
|
<!-- Main Loader -->
|
|
<RelativeLayout
|
|
android:id="@+id/loader"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:visibility="gone">
|
|
|
|
<com.github.ybq.android.spinkit.SpinKitView
|
|
style="@style/SpinKitView.DoubleBounce"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center" />
|
|
</RelativeLayout>
|
|
</RelativeLayout>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="2"
|
|
android:layout_marginStart="@dimen/video_comment_margin"
|
|
android:layout_marginEnd="@dimen/video_comment_margin"
|
|
>
|
|
<androidx.core.widget.NestedScrollView
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
android:id="@+id/peertube_information_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="20dp"
|
|
android:layout_marginLeft="20dp"
|
|
android:layout_marginEnd="20dp"
|
|
android:layout_marginRight="20dp"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/peertube_title"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="5dp" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="5dp"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/peertube_view_count"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:drawablePadding="5dp"
|
|
android:gravity="center_horizontal"
|
|
android:text="0"
|
|
app:drawableTopCompat="@drawable/ic_baseline_visibility_24"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
<TextView
|
|
android:id="@+id/peertube_like_count"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginStart="20dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:drawablePadding="5dp"
|
|
android:gravity="center_horizontal"
|
|
android:text="0"
|
|
app:drawableTopCompat="@drawable/ic_baseline_thumb_up_alt_24"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
<TextView
|
|
android:id="@+id/peertube_dislike_count"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:drawablePadding="5dp"
|
|
android:gravity="center_horizontal"
|
|
android:text="0"
|
|
app:drawableTopCompat="@drawable/ic_baseline_thumb_down_alt_24"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
<TextView
|
|
android:id="@+id/peertube_bookmark"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:drawablePadding="5dp"
|
|
android:gravity="center_horizontal"
|
|
android:text=""
|
|
app:drawableTopCompat="@drawable/ic_baseline_bookmark_border_24" />
|
|
|
|
<TextView
|
|
android:id="@+id/peertube_playlist"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:drawablePadding="5dp"
|
|
android:gravity="center_horizontal"
|
|
android:text=""
|
|
android:visibility="gone"
|
|
app:drawableTopCompat="@drawable/ic_baseline_list_24" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
tools:ignore="UselessLeaf" />
|
|
|
|
|
|
<TextView
|
|
android:id="@+id/more_actions"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:drawablePadding="5dp"
|
|
android:gravity="center_horizontal"
|
|
android:text=""
|
|
app:drawableTopCompat="@drawable/ic_baseline_more_vert_24" />
|
|
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/peertube_description"
|
|
android:textIsSelectable="true"
|
|
android:autoLink="web"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="10dp" />
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/write_comment_container"
|
|
android:layout_margin="10dp"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
<View
|
|
android:id="@+id/separator_top"
|
|
android:layout_margin="5dp"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintBottom_toTopOf="@+id/write_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1px"
|
|
android:background="@android:color/darker_gray"/>
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
app:layout_constraintTop_toBottomOf="@+id/separator_top"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintBottom_toTopOf="@+id/separator_bottom"
|
|
android:id="@+id/write_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
<ImageView
|
|
android:id="@+id/my_pp"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
android:layout_marginEnd="5dp"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
android:layout_width="30dp"
|
|
android:layout_height="30dp"
|
|
android:contentDescription="@string/profile_picture" />
|
|
<studio.carbonylgroup.textfieldboxes.TextFieldBoxes
|
|
android:id="@+id/text_field_boxes"
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toEndOf="@+id/my_pp"
|
|
app:layout_constraintEnd_toStartOf="@+id/send"
|
|
app:labelText="@string/add_public_comment"
|
|
app:secondaryColor="?attr/colorAccent"
|
|
app:primaryColor="?attr/colorAccent"
|
|
>
|
|
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
|
|
android:id="@+id/add_comment_write"
|
|
app:alwaysShowHint="false"
|
|
app:useDenseSpacing="false"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
/>
|
|
</studio.carbonylgroup.textfieldboxes.TextFieldBoxes>
|
|
<ImageView
|
|
android:layout_marginStart="5dp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:id="@+id/send"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:contentDescription="@string/send_comment"
|
|
android:src="@drawable/ic_baseline_send_24" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<View
|
|
android:id="@+id/separator_bottom"
|
|
android:layout_margin="5dp"
|
|
app:layout_constraintTop_toBottomOf="@+id/write_container"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1px"
|
|
android:background="@android:color/darker_gray"/>
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/peertube_comments"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content" />
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/no_action"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone">
|
|
|
|
<TextView
|
|
android:id="@+id/no_action_text"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center"
|
|
android:gravity="center"
|
|
android:padding="10dp"
|
|
android:text="@string/no_comments"
|
|
android:textSize="25sp" />
|
|
</RelativeLayout>
|
|
</LinearLayout>
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:background="?android:colorBackground"
|
|
android:visibility="gone"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
android:id="@+id/reply_thread"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
<LinearLayout
|
|
android:layout_marginStart="20dp"
|
|
android:layout_marginLeft="20dp"
|
|
android:layout_marginEnd="20dp"
|
|
android:layout_marginRight="20dp"
|
|
android:id="@+id/main_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:divider="?android:dividerHorizontal"
|
|
android:orientation="vertical"
|
|
android:showDividers="end">
|
|
<ImageView
|
|
android:layout_gravity="end|center_vertical"
|
|
android:id="@+id/close_reply"
|
|
android:layout_width="24dp"
|
|
android:layout_height="24dp"
|
|
android:contentDescription="@string/close"
|
|
android:src="@drawable/ic_close_black_48dp"/>
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
<ImageView
|
|
android:id="@+id/comment_account_profile"
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp"
|
|
android:layout_marginTop="5dp"
|
|
android:contentDescription="@string/profile_picture"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/comment_account_displayname"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="5dp"
|
|
android:singleLine="true"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toStartOf="@+id/comment_date"
|
|
app:layout_constraintStart_toEndOf="@+id/comment_account_profile"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/comment_account_username"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="2dp"
|
|
android:layout_marginStart="5dp"
|
|
android:ellipsize="end"
|
|
android:singleLine="true"
|
|
android:textSize="12sp"
|
|
app:layout_constraintStart_toEndOf="@+id/comment_account_profile"
|
|
app:layout_constraintTop_toBottomOf="@+id/comment_account_displayname" />
|
|
|
|
<TextView
|
|
android:id="@+id/comment_date"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="end"
|
|
android:layout_marginStart="2dp"
|
|
android:layout_weight="0"
|
|
android:gravity="end"
|
|
android:maxLines="1"
|
|
android:textSize="12sp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/comment_content"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="5dp"
|
|
android:textIsSelectable="true"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/comment_account_profile" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/write_comment_container_reply"
|
|
android:layout_margin="10dp"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
<View
|
|
android:id="@+id/separator_top_reply"
|
|
android:layout_margin="5dp"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintBottom_toTopOf="@+id/write_container_reply"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1px"
|
|
android:background="@android:color/darker_gray"/>
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
app:layout_constraintTop_toBottomOf="@+id/separator_top_reply"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintBottom_toTopOf="@+id/separator_bottom_reply"
|
|
android:id="@+id/write_container_reply"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
<ImageView
|
|
android:id="@+id/my_pp_reply"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
android:layout_width="30dp"
|
|
android:layout_height="30dp"
|
|
android:contentDescription="@string/profile_picture" />
|
|
<studio.carbonylgroup.textfieldboxes.TextFieldBoxes
|
|
android:id="@+id/text_field_boxes_reply"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toEndOf="@+id/my_pp_reply"
|
|
app:layout_constraintEnd_toStartOf="@+id/send_reply"
|
|
app:labelText="@string/add_public_reply"
|
|
app:secondaryColor="?attr/colorAccent"
|
|
app:primaryColor="?attr/colorAccent"
|
|
>
|
|
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
|
|
android:id="@+id/add_comment_write_reply"
|
|
app:alwaysShowHint="false"
|
|
app:useDenseSpacing="false"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
/>
|
|
</studio.carbonylgroup.textfieldboxes.TextFieldBoxes>
|
|
<ImageView
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:id="@+id/send_reply"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:contentDescription="@string/send_comment"
|
|
android:src="@drawable/ic_baseline_send_24"
|
|
/>
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<View
|
|
android:id="@+id/separator_bottom_reply"
|
|
android:layout_margin="5dp"
|
|
app:layout_constraintTop_toBottomOf="@+id/write_container_reply"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1px"
|
|
android:background="@android:color/darker_gray"/>
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
android:id="@+id/peertube_reply"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content" />
|
|
</LinearLayout>
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<!-- View where the video will be shown when video goes fullscreen -->
|
|
<RelativeLayout
|
|
android:id="@+id/videoLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@android:color/black"
|
|
android:visibility="gone" />
|
|
</LinearLayout>
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|