diff options
Diffstat (limited to '')
18 files changed, 336 insertions, 155 deletions
diff --git a/app/build.gradle b/app/build.gradle index 8b7abdaf..0775b8cb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -82,7 +82,9 @@ dependencies { def toroVersion = '3.7.0.2010003' implementation "im.ene.toro3:toro:$toroVersion" - implementation "im.ene.toro3:toro-ext-exoplayer:$toroVersion" + implementation("im.ene.toro3:toro-ext-exoplayer:$toroVersion") { + exclude module: 'extension-ima' + } testImplementation 'junit:junit:4.13' androidTestImplementation 'androidx.test:runner:1.2.0' diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AboutPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AboutPreferenceFragment.java index 3d81bb30..71e9dbc6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AboutPreferenceFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AboutPreferenceFragment.java @@ -13,6 +13,7 @@ import androidx.preference.Preference; import androidx.preference.PreferenceFragmentCompat; import ml.docilealligator.infinityforreddit.Activity.LinkResolverActivity; +import ml.docilealligator.infinityforreddit.BuildConfig; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; @@ -34,6 +35,7 @@ public class AboutPreferenceFragment extends PreferenceFragmentCompat { Preference redditAccountPreference = findPreference(SharedPreferencesUtils.REDDIT_ACCOUNT_KEY); Preference subredditPreference = findPreference(SharedPreferencesUtils.SUBREDDIT_KEY); Preference sharePreference = findPreference(SharedPreferencesUtils.SHARE_KEY); + Preference versionPreference = findPreference(SharedPreferencesUtils.VERSION_KEY); if (openSourcePreference != null) { openSourcePreference.setOnPreferenceClickListener(preference -> { @@ -112,6 +114,24 @@ public class AboutPreferenceFragment extends PreferenceFragmentCompat { return true; }); } + + if (versionPreference != null) { + versionPreference.setSummary(getString(R.string.settings_version_summary, BuildConfig.VERSION_NAME)); + + versionPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + int clickedTimes = 0; + + @Override + public boolean onPreferenceClick(Preference preference) { + clickedTimes++; + if (clickedTimes > 6) { + Toast.makeText(activity, R.string.no_developer_easter_egg, Toast.LENGTH_SHORT).show(); + clickedTimes = 0; + } + return true; + } + }); + } } @Override diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java index 8607b486..3bb14843 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java @@ -32,6 +32,7 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat { Preference gildedIconPreference = findPreference(SharedPreferencesUtils.GILDED_ICON_KEY); Preference crosspostIconPreference = findPreference(SharedPreferencesUtils.CROSSPOST_ICON_KEY); Preference thumbtackIconPreference = findPreference(SharedPreferencesUtils.THUMBTACK_ICON_KEY); + Preference bestRocketIconPreference = findPreference(SharedPreferencesUtils.BEST_ROCKET_ICON_KEY); Preference materialIconsPreference = findPreference(SharedPreferencesUtils.MATERIAL_ICONS_KEY); 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) { materialIconsPreference.setOnPreferenceClickListener(preference -> { Intent intent = new Intent(activity, LinkResolverActivity.class); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java index a26571a9..b36bb25d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java @@ -18,6 +18,7 @@ public class SharedPreferencesUtils { public static final String GILDED_ICON_KEY = "gilded_icon"; public static final String CROSSPOST_ICON_KEY = "crosspost_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 OPEN_SOURCE_KEY = "open_source"; public static final String RATE_KEY = "rate"; @@ -26,6 +27,7 @@ public class SharedPreferencesUtils { public static final String REDDIT_ACCOUNT_KEY = "reddit_account"; public static final String SUBREDDIT_KEY = "subreddit"; public static final String SHARE_KEY = "share"; + public static final String VERSION_KEY = "version"; public static final String FONT_SIZE_KEY = "font_size"; public static final String TITLE_FONT_SIZE_KEY = "title_font_size"; public static final String CONTENT_FONT_SIZE_KEY = "content_font_size"; diff --git a/app/src/main/res/drawable-night/ic_preview_24dp.xml b/app/src/main/res/drawable-night/ic_preview_24dp.xml new file mode 100644 index 00000000..e54e3a9f --- /dev/null +++ b/app/src/main/res/drawable-night/ic_preview_24dp.xml @@ -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:pathData="M12,6.5c3.79,0 7.17,2.13 8.82,5.5 -1.65,3.37 -5.02,5.5 -8.82,5.5S4.83,15.37 3.18,12C4.83,8.63 8.21,6.5 12,6.5m0,-2C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,9.5c1.38,0 2.5,1.12 2.5,2.5s-1.12,2.5 -2.5,2.5 -2.5,-1.12 -2.5,-2.5 1.12,-2.5 2.5,-2.5m0,-2c-2.48,0 -4.5,2.02 -4.5,4.5s2.02,4.5 4.5,4.5 4.5,-2.02 4.5,-4.5 -2.02,-4.5 -4.5,-4.5z" + android:fillColor="#FFFFFF"/> +</vector> diff --git a/app/src/main/res/drawable/ic_best_24.xml b/app/src/main/res/drawable/ic_best_24.xml new file mode 100644 index 00000000..6a592ecc --- /dev/null +++ b/app/src/main/res/drawable/ic_best_24.xml @@ -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> diff --git a/app/src/main/res/drawable/ic_controversial_24.xml b/app/src/main/res/drawable/ic_controversial_24.xml new file mode 100644 index 00000000..8084cc1d --- /dev/null +++ b/app/src/main/res/drawable/ic_controversial_24.xml @@ -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> diff --git a/app/src/main/res/drawable/ic_hot_24.xml b/app/src/main/res/drawable/ic_hot_24.xml new file mode 100644 index 00000000..c163a23d --- /dev/null +++ b/app/src/main/res/drawable/ic_hot_24.xml @@ -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> diff --git a/app/src/main/res/drawable/ic_new_24.xml b/app/src/main/res/drawable/ic_new_24.xml new file mode 100644 index 00000000..5ed64d37 --- /dev/null +++ b/app/src/main/res/drawable/ic_new_24.xml @@ -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> diff --git a/app/src/main/res/drawable/ic_random_24.xml b/app/src/main/res/drawable/ic_random_24.xml new file mode 100644 index 00000000..002ff2d7 --- /dev/null +++ b/app/src/main/res/drawable/ic_random_24.xml @@ -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> diff --git a/app/src/main/res/drawable/ic_rising_24.xml b/app/src/main/res/drawable/ic_rising_24.xml new file mode 100644 index 00000000..75754f74 --- /dev/null +++ b/app/src/main/res/drawable/ic_rising_24.xml @@ -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> diff --git a/app/src/main/res/drawable/ic_top_24.xml b/app/src/main/res/drawable/ic_top_24.xml new file mode 100644 index 00000000..ed64f733 --- /dev/null +++ b/app/src/main/res/drawable/ic_top_24.xml @@ -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> diff --git a/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml index f7511131..8b1c86b6 100644 --- a/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml @@ -1,95 +1,111 @@ <?xml version="1.0" encoding="utf-8"?> <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_height="wrap_content" - android:paddingBottom="8dp" - android:overScrollMode="never"> + android:overScrollMode="never" + android:paddingBottom="8dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/relevance_type_text_view_search_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_relevance" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_relevance" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/hot_type_text_view_search_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_hot" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_hot" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/top_type_text_view_search_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_top" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_top" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/new_type_text_view_search_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_new" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_new" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/comments_type_text_view_search_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_comments" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_comments" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> </LinearLayout> -</androidx.core.widget.NestedScrollView>
\ No newline at end of file +</androidx.core.widget.NestedScrollView> diff --git a/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml index d8a62445..d5c9e34d 100644 --- a/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml @@ -1,127 +1,149 @@ <?xml version="1.0" encoding="utf-8"?> <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_height="wrap_content" - android:paddingBottom="8dp" - android:overScrollMode="never"> + android:overScrollMode="never" + android:paddingBottom="8dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> - <TextView + <androidx.appcompat.widget.AppCompatTextView 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="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_best" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView 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="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_hot" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView 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="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_new" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView 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="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_random" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView 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="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_rising" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView 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="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_top" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView 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_controversial" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_controversial" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> </LinearLayout> -</androidx.core.widget.NestedScrollView>
\ No newline at end of file +</androidx.core.widget.NestedScrollView> diff --git a/app/src/main/res/layout/fragment_user_thing_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_user_thing_sort_type_bottom_sheet.xml index 8abaf5ff..17056053 100644 --- a/app/src/main/res/layout/fragment_user_thing_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_user_thing_sort_type_bottom_sheet.xml @@ -1,71 +1,85 @@ <?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" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" android:layout_height="match_parent" + android:orientation="vertical" android:paddingBottom="8dp"> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/new_type_text_view_user_thing_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_new" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_new" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/hot_type_text_view_user_thing_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_hot" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_hot" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/top_type_text_view_user_thing_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_top" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_top" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/controversial_type_text_view_user_thing_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_controversial" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" + 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:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingStart="32dp" + android:paddingTop="16dp" android:paddingEnd="32dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:paddingBottom="16dp" + android:text="@string/sort_controversial" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + app:drawableTint="?attr/primaryTextColor" /> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index da7223fc..4b8e20e4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -388,6 +388,8 @@ <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_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_open_source_title">Open Source</string> <string name="settings_open_source_summary">Star it on Github if you like this app</string> @@ -403,6 +405,8 @@ <string name="settings_subreddit_summary">r/Infinity_For_Reddit</string> <string name="settings_share_title">Share</string> <string name="settings_share_summary">Share this app to other people if you enjoy it</string> + <string name="settings_version_title">Infinity For Reddit</string> + <string name="settings_version_summary">Version %s</string> <string name="settings_category_customization_title">Customization</string> <string name="settings_customize_light_theme_title">Light Theme</string> <string name="settings_customize_dark_theme_title">Dark Theme</string> @@ -426,6 +430,7 @@ <string name="settings_tab_subreddit_name">Subreddit Name (Without r/ prefix)</string> <string name="settings_tab_multi_reddit_name">MultiReddit Name (/user/yourusername/m/yourmultiredditname)</string> <string name="settings_tab_username">Username (Without u/ prefix)</string> + <string name="no_developer_easter_egg">There\'s no developer options here</string> <string name="no_link_available">Cannot get the link</string> diff --git a/app/src/main/res/xml/about_preferences.xml b/app/src/main/res/xml/about_preferences.xml index 2772f2ed..a73f9aaa 100644 --- a/app/src/main/res/xml/about_preferences.xml +++ b/app/src/main/res/xml/about_preferences.xml @@ -45,4 +45,9 @@ app:title="@string/settings_share_title" app:summary="@string/settings_share_summary" /> -</PreferenceScreen>
\ No newline at end of file + <Preference + android:key="version" + app:title="@string/settings_version_title" + app:summary="@string/settings_version_summary" /> + +</PreferenceScreen> diff --git a/app/src/main/res/xml/credits_preferences.xml b/app/src/main/res/xml/credits_preferences.xml index e630422b..8e622332 100644 --- a/app/src/main/res/xml/credits_preferences.xml +++ b/app/src/main/res/xml/credits_preferences.xml @@ -33,7 +33,12 @@ 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 android:key="material_icons" app:title="@string/settings_credits_material_icons_title"/> -</PreferenceScreen>
\ No newline at end of file +</PreferenceScreen> |