aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/activity_view_post_detail.xml39
-rw-r--r--app/src/main/res/layout/fragment_view_post_detail.xml48
-rw-r--r--app/src/main/res/menu/view_post_detail_fragment.xml (renamed from app/src/main/res/menu/view_post_detail_activity.xml)30
-rw-r--r--app/src/main/res/values/strings.xml2
4 files changed, 66 insertions, 53 deletions
diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml
index 2e3479d0..d16899f3 100644
--- a/app/src/main/res/layout/activity_view_post_detail.xml
+++ b/app/src/main/res/layout/activity_view_post_detail.xml
@@ -32,44 +32,11 @@
</com.google.android.material.appbar.AppBarLayout>
- <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
- android:id="@+id/swipe_refresh_layout_view_post_detail_activity"
+ <androidx.viewpager2.widget.ViewPager2
+ android:id="@+id/view_pager_2_view_post_detail_activity"
android:layout_width="match_parent"
android:layout_height="match_parent"
- app:layout_behavior="@string/appbar_scrolling_view_behavior">
-
- <ml.docilealligator.infinityforreddit.customviews.CustomToroContainer
- android:id="@+id/recycler_view_view_post_detail"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingBottom="144dp"
- android:clipToPadding="false" />
-
- </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-
- <LinearLayout
- android:id="@+id/fetch_post_info_linear_layout_view_post_detail_activity"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:orientation="vertical"
- android:visibility="gone">
-
- <ImageView
- android:id="@+id/fetch_post_info_image_view_view_post_detail_activity"
- android:layout_width="150dp"
- android:layout_height="wrap_content" />
-
- <TextView
- android:id="@+id/fetch_post_info_text_view_view_post_detail_activity"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="16dp"
- android:gravity="center"
- android:textSize="?attr/font_default"
- android:fontFamily="?attr/font_family" />
-
- </LinearLayout>
+ app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_view_post_detail_activity"
diff --git a/app/src/main/res/layout/fragment_view_post_detail.xml b/app/src/main/res/layout/fragment_view_post_detail.xml
new file mode 100644
index 00000000..7b2c314a
--- /dev/null
+++ b/app/src/main/res/layout/fragment_view_post_detail.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout 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"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ tools:context=".fragments.ViewPostDetailFragment">
+
+ <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+ android:id="@+id/swipe_refresh_layout_view_post_detail_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+ <ml.docilealligator.infinityforreddit.customviews.CustomToroContainer
+ android:id="@+id/recycler_view_view_post_detail_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="144dp"
+ android:clipToPadding="false" />
+
+ </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+
+ <LinearLayout
+ android:id="@+id/fetch_post_info_linear_layout_view_post_detail_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:visibility="gone">
+
+ <ImageView
+ android:id="@+id/fetch_post_info_image_view_view_post_detail_fragment"
+ android:layout_width="150dp"
+ android:layout_height="wrap_content" />
+
+ <TextView
+ android:id="@+id/fetch_post_info_text_view_view_post_detail_fragment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="16dp"
+ android:gravity="center"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family" />
+
+ </LinearLayout>
+
+</FrameLayout> \ No newline at end of file
diff --git a/app/src/main/res/menu/view_post_detail_activity.xml b/app/src/main/res/menu/view_post_detail_fragment.xml
index 454603aa..d9e66bd6 100644
--- a/app/src/main/res/menu/view_post_detail_activity.xml
+++ b/app/src/main/res/menu/view_post_detail_fragment.xml
@@ -2,7 +2,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
- android:id="@+id/action_comment_view_post_detail_activity"
+ android:id="@+id/action_comment_view_post_detail_fragment"
android:orderInCategory="1"
android:title="@string/action_add_comment"
android:icon="@drawable/ic_comment_toolbar_24dp"
@@ -10,92 +10,92 @@
android:visible="false" />
<item
- android:id="@+id/action_save_view_post_detail_activity"
+ android:id="@+id/action_save_view_post_detail_fragment"
android:orderInCategory="2"
android:title="@string/action_save_post"
app:showAsAction="ifRoom"
android:visible="false" />
<item
- android:id="@+id/action_sort_view_post_detail_activity"
+ android:id="@+id/action_sort_view_post_detail_fragment"
android:orderInCategory="3"
android:title="@string/action_sort"
app:showAsAction="never"
android:visible="false" />
<item
- android:id="@+id/action_refresh_view_post_detail_activity"
+ android:id="@+id/action_refresh_view_post_detail_fragment"
android:orderInCategory="4"
android:title="@string/action_refresh"
app:showAsAction="never" />
<item
- android:id="@+id/action_view_crosspost_parent_view_post_detail_activity"
+ android:id="@+id/action_view_crosspost_parent_view_post_detail_fragment"
android:orderInCategory="5"
android:title="@string/action_view_crosspost_parent"
app:showAsAction="never"
android:visible="false" />
<item
- android:id="@+id/action_hide_view_post_detail_activity"
+ android:id="@+id/action_hide_view_post_detail_fragment"
android:orderInCategory="6"
app:showAsAction="never"
android:visible="false" />
<item
- android:id="@+id/action_edit_view_post_detail_activity"
+ android:id="@+id/action_edit_view_post_detail_fragment"
android:orderInCategory="7"
android:title="@string/action_edit_post"
app:showAsAction="never"
android:visible="false" />
<item
- android:id="@+id/action_delete_view_post_detail_activity"
+ android:id="@+id/action_delete_view_post_detail_fragment"
android:orderInCategory="8"
android:title="@string/action_delete_post"
app:showAsAction="never"
android:visible="false" />
<item
- android:id="@+id/action_nsfw_view_post_detail_activity"
+ android:id="@+id/action_nsfw_view_post_detail_fragment"
android:orderInCategory="9"
app:showAsAction="never"
android:visible="false" />
<item
- android:id="@+id/action_spoiler_view_post_detail_activity"
+ android:id="@+id/action_spoiler_view_post_detail_fragment"
android:orderInCategory="10"
app:showAsAction="never"
android:visible="false" />
<item
- android:id="@+id/action_edit_flair_view_post_detail_activity"
+ android:id="@+id/action_edit_flair_view_post_detail_fragment"
android:orderInCategory="11"
android:title="@string/action_edit_flair"
app:showAsAction="never"
android:visible="false" />
<item
- android:id="@+id/action_give_award_view_post_detail_activity"
+ android:id="@+id/action_give_award_view_post_detail_fragment"
android:orderInCategory="12"
android:title="@string/action_give_award"
app:showAsAction="never" />
<item
- android:id="@+id/action_report_view_post_detail_activity"
+ android:id="@+id/action_report_view_post_detail_fragment"
android:orderInCategory="13"
android:title="@string/action_report"
app:showAsAction="never" />
<item
- android:id="@+id/action_see_removed_view_post_detail_activity"
+ android:id="@+id/action_see_removed_view_post_detail_fragment"
android:orderInCategory="14"
android:title="@string/action_see_removed"
app:showAsAction="never"
android:visible="false" />
<item
- android:id="@+id/action_crosspost_view_post_detail_activity"
+ android:id="@+id/action_crosspost_view_post_detail_fragment"
android:orderInCategory="15"
android:title="@string/action_crosspost"
app:showAsAction="never" />
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 50eab52f..b06b9b52 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1016,7 +1016,5 @@
<string name="add_subreddit_or_user_to_multireddit_failed">Unable to add %1$s to multireddit %2$s</string>
<string name="choose_a_user">Choose a user</string>
- <!-- TODO: Remove or change this placeholder text -->
- <string name="hello_blank_fragment">Hello blank fragment</string>
</resources>