mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Add a time option to some sort types. Remember the last sort type.
This commit is contained in:
100
app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml
Normal file
100
app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:orientation="vertical"
|
||||
android:paddingBottom="8dp"
|
||||
tools:context=".Fragment.SortTimeBottomSheetFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hour_text_view_sort_time_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_time_hour"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/day_text_view_sort_time_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_time_day"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/week_text_view_sort_time_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_time_week"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/month_text_view_sort_time_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_time_month"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/year_text_view_sort_time_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_time_year"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/all_time_text_view_sort_time_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sort_time_all_time"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
</LinearLayout>
|
@@ -188,6 +188,12 @@
|
||||
<string name="sort_relevance">Relevance</string>
|
||||
<string name="sort_comments">Comments</string>
|
||||
<string name="sort_activity">Activity</string>
|
||||
<string name="sort_time_hour">Hour</string>
|
||||
<string name="sort_time_day">Day</string>
|
||||
<string name="sort_time_week">Week</string>
|
||||
<string name="sort_time_month">Month</string>
|
||||
<string name="sort_time_year">Year</string>
|
||||
<string name="sort_time_all_time">All Time</string>
|
||||
|
||||
<string name="open_link_with">Open link with</string>
|
||||
<string name="no_browser_found">No browser found</string>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:label="@string/app_label"
|
||||
android:value="@string/app_label"
|
||||
android:hint="@string/search_hint"
|
||||
android:voiceSearchMode="showVoiceSearchButton|launchRecognizer" >
|
||||
</searchable>
|
Reference in New Issue
Block a user