diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/activity_view_gif.xml | 57 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_view_image_or_gif.xml (renamed from app/src/main/res/layout/activity_view_image.xml) | 37 | ||||
-rw-r--r-- | app/src/main/res/menu/view_gif_activity.xml | 17 | ||||
-rw-r--r-- | app/src/main/res/menu/view_image_or_gif_activity.xml (renamed from app/src/main/res/menu/view_image_activity.xml) | 13 |
4 files changed, 28 insertions, 96 deletions
diff --git a/app/src/main/res/layout/activity_view_gif.xml b/app/src/main/res/layout/activity_view_gif.xml deleted file mode 100644 index a09b4a4e..00000000 --- a/app/src/main/res/layout/activity_view_gif.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<com.thefuntasty.hauler.HaulerView - 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:id="@+id/hauler_view_view_gif_activity" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:keepScreenOn="true" - app:dragUpEnabled="true" - tools:application="ml.docilealligator.infinityforreddit.Activity.ViewGIFActivity"> - - <androidx.core.widget.NestedScrollView - android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <ProgressBar - android:id="@+id/progress_bar_view_gif_activity" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerInParent="true" /> - - <pl.droidsonroids.gif.GifImageView - android:id="@+id/image_view_view_gif_activity" - android:layout_width="match_parent" - android:layout_height="match_parent" - app:gest_fillViewport="true" /> - - <LinearLayout - android:id="@+id/load_image_error_linear_layout_view_gif_activity" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="gone"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:drawableTop="@drawable/ic_error_outline_white_24dp" - android:layout_gravity="center" - android:gravity="center" - android:textColor="@android:color/white" - android:text="@string/error_loading_gif_tap_to_retry" - android:textSize="?attr/font_default" - android:fontFamily="?attr/font_family" /> - - </LinearLayout> - - </RelativeLayout> - - </androidx.core.widget.NestedScrollView> - -</com.thefuntasty.hauler.HaulerView>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_view_image.xml b/app/src/main/res/layout/activity_view_image_or_gif.xml index 9a80a732..019bbc7b 100644 --- a/app/src/main/res/layout/activity_view_image.xml +++ b/app/src/main/res/layout/activity_view_image_or_gif.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<com.thefuntasty.hauler.HaulerView - xmlns:android="http://schemas.android.com/apk/res/android" +<com.thefuntasty.hauler.HaulerView 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:id="@+id/hauler_view_view_image_activity" + android:id="@+id/hauler_view_view_image_or_gif_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:dragUpEnabled="true" @@ -19,21 +18,27 @@ android:layout_height="match_parent"> <ProgressBar - android:id="@+id/progress_bar_view_image_activity" + android:id="@+id/progress_bar_view_image_or_gif_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" /> - <com.alexvasilkov.gestures.views.GestureImageView - android:id="@+id/image_view_view_image_activity" + <com.alexvasilkov.gestures.views.GestureFrameLayout + android:id="@+id/gesture_layout_view_image_or_gif_activity" android:layout_width="match_parent" - android:layout_height="match_parent" - android:adjustViewBounds="true" - android:scaleType="fitCenter" - app:gest_fillViewport="true" /> + android:layout_height="match_parent"> + + <pl.droidsonroids.gif.GifImageView + android:id="@+id/image_view_view_image_or_gif_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:adjustViewBounds="true" + android:scaleType="fitCenter" + app:gest_fillViewport="true" /> + </com.alexvasilkov.gestures.views.GestureFrameLayout> <LinearLayout - android:id="@+id/load_image_error_linear_layout_view_image_activity" + android:id="@+id/load_image_error_linear_layout_view_image_or_gif_activity" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone"> @@ -41,13 +46,13 @@ <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - android:drawableTop="@drawable/ic_error_outline_white_24dp" android:layout_gravity="center" + android:drawableTop="@drawable/ic_error_outline_white_24dp" + android:fontFamily="?attr/font_family" android:gravity="center" - android:textColor="@android:color/white" android:text="@string/error_loading_image_tap_to_retry" - android:textSize="?attr/font_default" - android:fontFamily="?attr/font_family" /> + android:textColor="@android:color/white" + android:textSize="?attr/font_default" /> </LinearLayout> @@ -55,4 +60,4 @@ </androidx.core.widget.NestedScrollView> -</com.thefuntasty.hauler.HaulerView>
\ No newline at end of file +</com.thefuntasty.hauler.HaulerView> diff --git a/app/src/main/res/menu/view_gif_activity.xml b/app/src/main/res/menu/view_gif_activity.xml deleted file mode 100644 index 0dc5aba5..00000000 --- a/app/src/main/res/menu/view_gif_activity.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<menu xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto"> - <item - android:id="@+id/action_download_view_gif_activity" - android:orderInCategory="1" - android:title="@string/action_download" - android:icon="@drawable/ic_file_download_toolbar_white_24dp" - app:showAsAction="ifRoom" /> - - <item - android:id="@+id/action_share_view_gif_activity" - android:orderInCategory="2" - android:title="@string/action_share" - android:icon="@drawable/ic_share_toolbar_white_24dp" - app:showAsAction="ifRoom" /> -</menu>
\ No newline at end of file diff --git a/app/src/main/res/menu/view_image_activity.xml b/app/src/main/res/menu/view_image_or_gif_activity.xml index 0c080ae9..682516a4 100644 --- a/app/src/main/res/menu/view_image_activity.xml +++ b/app/src/main/res/menu/view_image_or_gif_activity.xml @@ -2,22 +2,23 @@ <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item - android:id="@+id/action_download_view_image_activity" + android:id="@+id/action_download_view_image_or_gif_activity" + android:icon="@drawable/ic_file_download_toolbar_white_24dp" android:orderInCategory="1" android:title="@string/action_download" - android:icon="@drawable/ic_file_download_toolbar_white_24dp" app:showAsAction="ifRoom" /> <item - android:id="@+id/action_share_view_image_activity" + android:id="@+id/action_share_view_image_or_gif_activity" + android:icon="@drawable/ic_share_toolbar_white_24dp" android:orderInCategory="2" android:title="@string/action_share" - android:icon="@drawable/ic_share_toolbar_white_24dp" app:showAsAction="ifRoom" /> <item - android:id="@+id/action_set_wallpaper_view_image_activity" + android:id="@+id/action_set_wallpaper_view_image_or_gif_activity" android:orderInCategory="3" android:title="@string/action_set_wallpaper" + android:visible="false" app:showAsAction="never" /> -</menu>
\ No newline at end of file +</menu> |