Merge pull request #131 from OHermesJunior/sort-icons

Add icons to sort bottom sheets.
This commit is contained in:
Docile-Alligator 2020-06-20 12:18:02 +08:00 committed by GitHub
commit 8871eeaca8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 294 additions and 153 deletions

View File

@ -32,6 +32,7 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat {
Preference gildedIconPreference = findPreference(SharedPreferencesUtils.GILDED_ICON_KEY); Preference gildedIconPreference = findPreference(SharedPreferencesUtils.GILDED_ICON_KEY);
Preference crosspostIconPreference = findPreference(SharedPreferencesUtils.CROSSPOST_ICON_KEY); Preference crosspostIconPreference = findPreference(SharedPreferencesUtils.CROSSPOST_ICON_KEY);
Preference thumbtackIconPreference = findPreference(SharedPreferencesUtils.THUMBTACK_ICON_KEY); Preference thumbtackIconPreference = findPreference(SharedPreferencesUtils.THUMBTACK_ICON_KEY);
Preference bestRocketIconPreference = findPreference(SharedPreferencesUtils.BEST_ROCKET_ICON_KEY);
Preference materialIconsPreference = findPreference(SharedPreferencesUtils.MATERIAL_ICONS_KEY); Preference materialIconsPreference = findPreference(SharedPreferencesUtils.MATERIAL_ICONS_KEY);
if (iconForegroundPreference != null) { if (iconForegroundPreference != null) {
@ -88,6 +89,15 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat {
}); });
} }
if (bestRocketIconPreference != null) {
bestRocketIconPreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(activity, LinkResolverActivity.class);
intent.setData(Uri.parse("https://www.flaticon.com/free-icon/spring-swing-rocket_2929322?term=space%20ship&page=1&position=18"));
startActivity(intent);
return true;
});
}
if (materialIconsPreference != null) { if (materialIconsPreference != null) {
materialIconsPreference.setOnPreferenceClickListener(preference -> { materialIconsPreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(activity, LinkResolverActivity.class); Intent intent = new Intent(activity, LinkResolverActivity.class);

View File

@ -18,6 +18,7 @@ public class SharedPreferencesUtils {
public static final String GILDED_ICON_KEY = "gilded_icon"; public static final String GILDED_ICON_KEY = "gilded_icon";
public static final String CROSSPOST_ICON_KEY = "crosspost_icon"; public static final String CROSSPOST_ICON_KEY = "crosspost_icon";
public static final String THUMBTACK_ICON_KEY = "thumbtack_icon"; public static final String THUMBTACK_ICON_KEY = "thumbtack_icon";
public static final String BEST_ROCKET_ICON_KEY = "best_rocket_icon";
public static final String MATERIAL_ICONS_KEY = "material_icons"; public static final String MATERIAL_ICONS_KEY = "material_icons";
public static final String OPEN_SOURCE_KEY = "open_source"; public static final String OPEN_SOURCE_KEY = "open_source";
public static final String RATE_KEY = "rate"; public static final String RATE_KEY = "rate";

View File

@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group
android:pivotX="12"
android:pivotY="12"
android:rotation="30">
<path
android:fillColor="@android:color/white"
android:pathData="M11.3,22.66h1.4L12.7,24h-1.4zM11.3,22.66M12.07,0.06L12,0l-0.07,0.06a15.15,15.15 0,0 0,-3.47 4.89h7.08A15.1,15.1 0,0 0,12.07 0.06zM12.07,0.06M4.04,13.69v6.2l3.67,-1.15a16.43,16.43 0,0 1,-1.85 -6.21zM4.04,13.69M13.28,10.8a1.28,1.28 0,1 0,-2.56 0,1.28 1.28,0 0,0 2.56,0zM13.28,10.8" />
<path
android:fillColor="@android:color/white"
android:pathData="M14.44,19.13a15,15 0,0 0,1.64 -12.77L7.92,6.36a15,15 0,0 0,1.64 12.77h1.74v2.06h1.4v-2.07zM9.32,10.8a2.68,2.68 0,1 1,5.37 0,2.68 2.68,0 0,1 -5.37,0zM9.32,10.8M8.83,20.53h1.4v1.9h-1.4zM8.83,20.53M18.14,12.53c-0.2,2.17 -0.83,4.28 -1.85,6.2l3.67,1.16v-6.2zM18.14,12.53M13.77,20.53h1.4v1.9h-1.4zM13.77,20.53" />
</group>
</vector>

View 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="@android:color/white"
android:pathData="M9,3L5,6.99h3L8,14h2L10,6.99h3L9,3zM16,17.01L16,10h-2v7.01h-3L15,21l4,-3.99h-3z" />
</vector>

View 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="@android:color/white"
android:pathData="M13.5,0.67s0.74,2.65 0.74,4.8c0,2.06 -1.35,3.73 -3.41,3.73 -2.07,0 -3.63,-1.67 -3.63,-3.73l0.03,-0.36C5.21,7.51 4,10.62 4,14c0,4.42 3.58,8 8,8s8,-3.58 8,-8C20,8.61 17.41,3.8 13.5,0.67zM11.71,19c-1.78,0 -3.22,-1.4 -3.22,-3.14 0,-1.62 1.05,-2.76 2.81,-3.12 1.77,-0.36 3.6,-1.21 4.62,-2.58 0.39,1.29 0.59,2.65 0.59,4.04 0,2.65 -2.15,4.8 -4.8,4.8z" />
</vector>

View 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="@android:color/white"
android:pathData="M23,12l-2.44,-2.78 0.34,-3.68 -3.61,-0.82 -1.89,-3.18L12,3 8.6,1.54 6.71,4.72l-3.61,0.81 0.34,3.68L1,12l2.44,2.78 -0.34,3.69 3.61,0.82 1.89,3.18L12,21l3.4,1.46 1.89,-3.18 3.61,-0.82 -0.34,-3.68L23,12z" />
</vector>

View 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="@android:color/white"
android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM7.5,18c-0.83,0 -1.5,-0.67 -1.5,-1.5S6.67,15 7.5,15s1.5,0.67 1.5,1.5S8.33,18 7.5,18zM7.5,9C6.67,9 6,8.33 6,7.5S6.67,6 7.5,6 9,6.67 9,7.5 8.33,9 7.5,9zM12,13.5c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5zM16.5,18c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5zM16.5,9c-0.83,0 -1.5,-0.67 -1.5,-1.5S15.67,6 16.5,6s1.5,0.67 1.5,1.5S17.33,9 16.5,9z" />
</vector>

View 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="@android:color/white"
android:pathData="M16,6l2.29,2.29 -4.88,4.88 -4,-4L2,16.59 3.41,18l6,-6 4,4 6.3,-6.29L22,12V6z" />
</vector>

View 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="@android:color/white"
android:pathData="M10,20h4L14,6h-4v16zM4,20h4v-8L4,12v8zM16,9v11h4L20,9h-4zM7,6l5,-5 5,5z" />
</vector>

View File

@ -1,94 +1,110 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="8dp" android:overScrollMode="never"
android:overScrollMode="never"> android:paddingBottom="8dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/relevance_type_text_view_search_sort_type_bottom_sheet_fragment" android:id="@+id/relevance_type_text_view_search_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_best_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_relevance" android:text="@string/sort_relevance"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/hot_type_text_view_search_sort_type_bottom_sheet_fragment" android:id="@+id/hot_type_text_view_search_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_hot_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_hot" android:text="@string/sort_hot"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/top_type_text_view_search_sort_type_bottom_sheet_fragment" android:id="@+id/top_type_text_view_search_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_top_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_top" android:text="@string/sort_top"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/new_type_text_view_search_sort_type_bottom_sheet_fragment" android:id="@+id/new_type_text_view_search_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_new_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_new" android:text="@string/sort_new"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/comments_type_text_view_search_sort_type_bottom_sheet_fragment" android:id="@+id/comments_type_text_view_search_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_comment_toolbar_24dp"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_comments" android:text="@string/sort_comments"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
</LinearLayout> </LinearLayout>

View File

@ -1,126 +1,148 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="8dp" android:overScrollMode="never"
android:overScrollMode="never"> android:paddingBottom="8dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/best_type_text_view_sort_type_bottom_sheet_fragment" android:id="@+id/best_type_text_view_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_best_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_best" android:text="@string/sort_best"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/hot_type_text_view_sort_type_bottom_sheet_fragment" android:id="@+id/hot_type_text_view_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_hot_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_hot" android:text="@string/sort_hot"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/new_type_text_view_sort_type_bottom_sheet_fragment" android:id="@+id/new_type_text_view_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_new_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_new" android:text="@string/sort_new"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/random_type_text_view_sort_type_bottom_sheet_fragment" android:id="@+id/random_type_text_view_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_random_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_random" android:text="@string/sort_random"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/rising_type_text_view_sort_type_bottom_sheet_fragment" android:id="@+id/rising_type_text_view_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_rising_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_rising" android:text="@string/sort_rising"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/top_type_text_view_sort_type_bottom_sheet_fragment" android:id="@+id/top_type_text_view_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_top_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_top" android:text="@string/sort_top"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet_fragment" android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_controversial_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_controversial" android:text="@string/sort_controversial"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
</LinearLayout> </LinearLayout>

View File

@ -1,71 +1,85 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/new_type_text_view_user_thing_sort_type_bottom_sheet_fragment" android:id="@+id/new_type_text_view_user_thing_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_new_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_new" android:text="@string/sort_new"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/hot_type_text_view_user_thing_sort_type_bottom_sheet_fragment" android:id="@+id/hot_type_text_view_user_thing_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_hot_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_hot" android:text="@string/sort_hot"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/top_type_text_view_user_thing_sort_type_bottom_sheet_fragment" android:id="@+id/top_type_text_view_user_thing_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_top_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_top" android:text="@string/sort_top"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/controversial_type_text_view_user_thing_sort_type_bottom_sheet_fragment" android:id="@+id/controversial_type_text_view_user_thing_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableStart="@drawable/ic_controversial_24"
android:drawablePadding="48dp"
android:focusable="true"
android:fontFamily="?attr/font_family"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_controversial" android:text="@string/sort_controversial"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" app:drawableTint="?attr/primaryTextColor" />
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
</LinearLayout> </LinearLayout>

View File

@ -387,6 +387,8 @@
<string name="settings_credits_crosspost_icon_summary">Icon made by Freepik from www.flaticon.com</string> <string name="settings_credits_crosspost_icon_summary">Icon made by Freepik from www.flaticon.com</string>
<string name="settings_credits_thumbtack_icon_title">Thumbtack Icon</string> <string name="settings_credits_thumbtack_icon_title">Thumbtack Icon</string>
<string name="settings_credits_thumbtack_icon_summary">Icon made by Freepik from www.flaticon.com</string> <string name="settings_credits_thumbtack_icon_summary">Icon made by Freepik from www.flaticon.com</string>
<string name="settings_credits_best_rocket_icon_title">Rocket Icon</string>
<string name="settings_credits_best_rocket_icon_summary">Icon made by Freepik from www.flaticon.com</string>
<string name="settings_credits_material_icons_title">Material Icons</string> <string name="settings_credits_material_icons_title">Material Icons</string>
<string name="settings_open_source_title">Open Source</string> <string name="settings_open_source_title">Open Source</string>
<string name="settings_open_source_summary">Star it on Github if you like this app</string> <string name="settings_open_source_summary">Star it on Github if you like this app</string>

View File

@ -32,6 +32,11 @@
app:title="@string/settings_credits_thumbtack_icon_title" app:title="@string/settings_credits_thumbtack_icon_title"
android:summary="@string/settings_credits_thumbtack_icon_summary" /> android:summary="@string/settings_credits_thumbtack_icon_summary" />
<Preference
android:key="best_rocket_icon"
app:title="@string/settings_credits_best_rocket_icon_title"
android:summary="@string/settings_credits_best_rocket_icon_summary" />
<Preference <Preference
android:key="material_icons" android:key="material_icons"
app:title="@string/settings_credits_material_icons_title"/> app:title="@string/settings_credits_material_icons_title"/>