Added support for view-once video.

This commit is contained in:
Alex Hart
2019-09-27 10:10:30 -03:00
committed by Greyson Parrelli
parent 50a81c0e60
commit d698d3bd6f
23 changed files with 405 additions and 46 deletions

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/core_black">
<ImageView
@@ -12,6 +12,12 @@
android:layout_height="match_parent"
android:scaleType="fitCenter"/>
<org.thoughtcrime.securesms.video.VideoPlayer
android:id="@+id/view_once_video"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/view_once_close_button"
android:layout_width="wrap_content"
@@ -21,4 +27,16 @@
android:tint="@color/core_white"
app:srcCompat="@drawable/ic_x"/>
<TextView
android:id="@+id/view_once_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|end"
android:layout_marginTop="15dp"
android:layout_marginEnd="16dp"
android:textAppearance="@style/ViewOnceVideo.Duration"
android:visibility="gone"
tools:visibility="visible"
tools:text="00:23" />
</FrameLayout>