mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Sorting posts is now available. Minor bugs fixed.
This commit is contained in:
9
app/src/main/res/drawable/ic_outline_sort_24px.xml
Normal file
9
app/src/main/res/drawable/ic_outline_sort_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z"/>
|
||||
</vector>
|
@@ -166,13 +166,11 @@
|
||||
android:textColor="@color/colorAccent"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_view_post_video_activity"
|
||||
<VideoView
|
||||
android:id="@+id/video_view_post_video_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitStart"
|
||||
android:adjustViewBounds="true"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
97
app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml
Normal file
97
app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/sort"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/best_type_text_view_sort_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_best"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hot_type_text_view_sort_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_hot"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/new_type_text_view_sort_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_new"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/random_type_text_view_sort_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_random"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rising_type_text_view_sort_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_rising"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_type_text_view_sort_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_top"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_rising"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
</LinearLayout>
|
97
app/src/main/res/layout/sort_type_bottom_sheet.xml
Normal file
97
app/src/main/res/layout/sort_type_bottom_sheet.xml
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/sort"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/best_type_text_view_sort_type_bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_best"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hot_type_text_view_sort_type_bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_hot"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/new_type_text_view_sort_type_bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_new"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/random_type_text_view_sort_type_bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_random"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rising_type_text_view_sort_type_bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_rising"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_type_text_view_sort_type_bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_top"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_rising"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
</LinearLayout>
|
@@ -4,21 +4,28 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="ml.docilealligator.infinityforreddit.MainActivity">
|
||||
<item
|
||||
android:id="@+id/action_search_main_activity"
|
||||
android:id="@+id/action_sort_main_activity"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/action_search"
|
||||
android:icon="@drawable/ic_outline_sort_24px"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search_main_activity"
|
||||
android:orderInCategory="2"
|
||||
android:title="@string/action_search"
|
||||
android:icon="@drawable/ic_search_white_24dp"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_refresh_main_activity"
|
||||
android:orderInCategory="2"
|
||||
android:orderInCategory="3"
|
||||
android:title="@string/action_refresh"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_lazy_mode_main_activity"
|
||||
android:orderInCategory="3"
|
||||
android:orderInCategory="4"
|
||||
android:title="@string/action_start_lazy_mode"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
@@ -4,21 +4,28 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="ml.docilealligator.infinityforreddit.ViewSubredditDetailActivity">
|
||||
<item
|
||||
android:id="@+id/action_search_view_subreddit_detail_activity"
|
||||
android:id="@+id/action_sort_view_subreddit_detail_activity"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/action_search"
|
||||
android:icon="@drawable/ic_outline_sort_24px"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search_view_subreddit_detail_activity"
|
||||
android:orderInCategory="2"
|
||||
android:title="@string/action_search"
|
||||
android:icon="@drawable/ic_search_white_24dp"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/action_refresh_view_subreddit_detail_activity"
|
||||
android:orderInCategory="2"
|
||||
android:orderInCategory="3"
|
||||
android:title="@string/action_refresh"
|
||||
android:icon="@drawable/ic_refresh_white_24dp"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_lazy_mode_view_subreddit_detail_activity"
|
||||
android:orderInCategory="3"
|
||||
android:orderInCategory="4"
|
||||
android:title="@string/action_start_lazy_mode"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
@@ -133,4 +133,16 @@
|
||||
<string name="all_subreddits">All subreddits</string>
|
||||
|
||||
<string name="error_loading_post">Error loading this post.\nTap to retry.</string>
|
||||
|
||||
<string name="sort">Sort</string>
|
||||
<string name="sort_best">Best</string>
|
||||
<string name="sort_hot">Hot</string>
|
||||
<string name="sort_new">New</string>
|
||||
<string name="sort_random">Random</string>
|
||||
<string name="sort_rising">Rising</string>
|
||||
<string name="sort_top">Top</string>
|
||||
<string name="sort_controversial">Controversial</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user