summaryrefslogtreecommitdiff
path: root/org.fox.ttrss/src/main/res
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-06-02 14:25:05 +0300
committerAndrew Dolgov <[email protected]>2017-06-02 14:25:05 +0300
commit047bb1cc37d189b24b3269d13397f83bc2797d2d (patch)
tree0593153e2096f9daa7dd89ca2495647a8f029971 /org.fox.ttrss/src/main/res
parentbbab856e3fd0066705263764bb846b4a6d7b7b91 (diff)
unified gallery pager for videos and image files
Diffstat (limited to 'org.fox.ttrss/src/main/res')
-rw-r--r--org.fox.ttrss/src/main/res/layout/activity_video_player.xml46
-rw-r--r--org.fox.ttrss/src/main/res/layout/activity_youtube_player.xml3
-rwxr-xr-xorg.fox.ttrss/src/main/res/layout/article_images_pager.xml1
-rw-r--r--org.fox.ttrss/src/main/res/layout/fragment_article_image.xml16
-rw-r--r--org.fox.ttrss/src/main/res/menu/activity_youtube_player.xml (renamed from org.fox.ttrss/src/main/res/menu/activity_video_player.xml)39
5 files changed, 33 insertions, 72 deletions
diff --git a/org.fox.ttrss/src/main/res/layout/activity_video_player.xml b/org.fox.ttrss/src/main/res/layout/activity_video_player.xml
deleted file mode 100644
index 1fbeb587..00000000
--- a/org.fox.ttrss/src/main/res/layout/activity_video_player.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fitsSystemWindows="true"
- android:background="@android:color/black"
- tools:context="org.fox.ttrss.VideoPlayerActivity">
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_below="@+id/toolbar">
-
- <SurfaceView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:id="@+id/video_player" />
-
- <ImageView
- android:id="@+id/video_player_cover"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
-
- <ProgressBar
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/video_loading"
- android:layout_gravity="center"
- android:indeterminate="true" />
-
- <ImageView
- android:id="@+id/video_player_overflow"
- android:clickable="true"
- android:layout_width="wrap_content"
- android:layout_height="26dp"
- android:layout_weight="0"
- android:background="@drawable/ripple"
- android:src="@drawable/ic_dots_vertical"
- android:layout_gravity="top|right"
- android:layout_marginRight="8dp"
- android:layout_marginTop="@dimen/activity_vertical_margin" />
- </FrameLayout>
-
- <include layout="@layout/toolbar" android:id="@+id/toolbar" />
-
-</RelativeLayout>
diff --git a/org.fox.ttrss/src/main/res/layout/activity_youtube_player.xml b/org.fox.ttrss/src/main/res/layout/activity_youtube_player.xml
index 3d2c9c9a..0b423edc 100644
--- a/org.fox.ttrss/src/main/res/layout/activity_youtube_player.xml
+++ b/org.fox.ttrss/src/main/res/layout/activity_youtube_player.xml
@@ -2,8 +2,7 @@
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
- android:background="@android:color/black"
- tools:context="org.fox.ttrss.VideoPlayerActivity">
+ android:background="@android:color/black">
<FrameLayout
android:layout_width="match_parent"
diff --git a/org.fox.ttrss/src/main/res/layout/article_images_pager.xml b/org.fox.ttrss/src/main/res/layout/article_images_pager.xml
index 469068eb..de99eedb 100755
--- a/org.fox.ttrss/src/main/res/layout/article_images_pager.xml
+++ b/org.fox.ttrss/src/main/res/layout/article_images_pager.xml
@@ -19,6 +19,7 @@
android:id="@+id/article_images_progress"
android:progress="0"
android:indeterminate="false"
+ android:visibility="gone"
android:layout_above="@+id/article_images_indicator"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
diff --git a/org.fox.ttrss/src/main/res/layout/fragment_article_image.xml b/org.fox.ttrss/src/main/res/layout/fragment_article_image.xml
index 29a53bd0..e5fe47f4 100644
--- a/org.fox.ttrss/src/main/res/layout/fragment_article_image.xml
+++ b/org.fox.ttrss/src/main/res/layout/fragment_article_image.xml
@@ -12,11 +12,13 @@
android:text="@string/error_loading_image"
android:id="@+id/flavor_image_error" />
- <ProgressBar
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ <TextureView
+ android:id="@+id/flavor_video"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:adjustViewBounds="true"
android:layout_gravity="center"
- android:id="@+id/flavor_image_progress" />
+ android:scaleType="fitCenter" />
<ImageView
android:id="@+id/flavor_image"
@@ -26,6 +28,12 @@
android:layout_gravity="center"
android:scaleType="fitCenter" />
+ <ProgressBar
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:id="@+id/flavor_image_progress" />
+
<ImageView
android:id="@+id/flavor_image_overflow"
android:clickable="true"
diff --git a/org.fox.ttrss/src/main/res/menu/activity_video_player.xml b/org.fox.ttrss/src/main/res/menu/activity_youtube_player.xml
index b323d3b7..acce1d3a 100644
--- a/org.fox.ttrss/src/main/res/menu/activity_video_player.xml
+++ b/org.fox.ttrss/src/main/res/menu/activity_youtube_player.xml
@@ -1,20 +1,19 @@
-<menu 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"
- tools:context="org.fox.ttrss.VideoPlayerActivity">
-
- <item
- android:id="@+id/article_vid_open"
- app:showAsAction=""
- android:title="@string/open_with"/>
- <item
- android:id="@+id/article_vid_copy"
- app:showAsAction=""
- android:icon="@drawable/ic_content_copy"
- android:title="@string/article_link_copy"/>
- <item
- android:id="@+id/article_vid_share"
- android:icon="@drawable/ic_share"
- app:showAsAction="ifRoom"
- android:title="@string/video_player_share"/>
-</menu>
+<menu 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">
+
+ <item
+ android:id="@+id/article_vid_open"
+ app:showAsAction=""
+ android:title="@string/open_with"/>
+ <item
+ android:id="@+id/article_vid_copy"
+ app:showAsAction=""
+ android:icon="@drawable/ic_content_copy"
+ android:title="@string/article_link_copy"/>
+ <item
+ android:id="@+id/article_vid_share"
+ android:icon="@drawable/ic_share"
+ app:showAsAction="ifRoom"
+ android:title="@string/video_player_share"/>
+</menu>