Add swipe gestures to media view

Fixes #2355
Closes #6632
This commit is contained in:
Moxie Marlinspike
2018-01-04 11:11:49 -08:00
parent 34424a9b3e
commit 8bba45f396
12 changed files with 578 additions and 112 deletions

View File

@@ -1,20 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray95">
<org.thoughtcrime.securesms.components.ZoomingImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/media_preview_activity__media_content_description" />
<org.thoughtcrime.securesms.video.VideoPlayer
android:id="@+id/video_player"
<android.support.v4.view.ViewPager
android:id="@+id/media_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>
android:layout_height="match_parent"/>
</RelativeLayout>
</FrameLayout>

20
res/layout/media_view.xml Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.thoughtcrime.securesms.components.ZoomingImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/media_preview_activity__media_content_description" />
<org.thoughtcrime.securesms.video.VideoPlayer
android:id="@+id/video_player"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>
</merge>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.thoughtcrime.securesms.components.MediaView
android:id="@+id/media_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>