aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-08-27 09:16:31 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-08-27 09:16:31 +0000
commit995701174de54219c528993674cfa92995c03d17 (patch)
tree8ba16a3866f864cb4f814cbf72bbd63a9179c19d
parent3b0eb15646cc9ac60a7661cf25d5a1a528bae404 (diff)
downloadinfinity-for-reddit-995701174de54219c528993674cfa92995c03d17.tar
infinity-for-reddit-995701174de54219c528993674cfa92995c03d17.tar.gz
infinity-for-reddit-995701174de54219c528993674cfa92995c03d17.tar.bz2
infinity-for-reddit-995701174de54219c528993674cfa92995c03d17.tar.lz
infinity-for-reddit-995701174de54219c528993674cfa92995c03d17.tar.xz
infinity-for-reddit-995701174de54219c528993674cfa92995c03d17.tar.zst
infinity-for-reddit-995701174de54219c528993674cfa92995c03d17.zip
Delete wrong credit. Change the notification icon and color.
-rw-r--r--.idea/assetWizardSettings.xml4
-rw-r--r--app/src/main/java/Settings/CreditsPreferenceFragment.java10
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/NotificationUtils.java6
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java1
-rw-r--r--app/src/main/res/drawable/ic_notification.xml19
-rw-r--r--app/src/main/res/values/colors.xml2
-rw-r--r--app/src/main/res/values/strings.xml2
-rw-r--r--app/src/main/res/xml/credits_preferences.xml5
8 files changed, 27 insertions, 22 deletions
diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml
index a708e9ab..599bbd3b 100644
--- a/.idea/assetWizardSettings.xml
+++ b/.idea/assetWizardSettings.xml
@@ -159,8 +159,8 @@
<map>
<entry key="assetSourceType" value="FILE" />
<entry key="color" value="ffffff" />
- <entry key="outputName" value="ic_medalha" />
- <entry key="sourceFile" value="$USER_HOME$/Downloads/medalha.svg" />
+ <entry key="outputName" value="ic_notification" />
+ <entry key="sourceFile" value="$USER_HOME$/Downloads/ic_notification.svg" />
</map>
</option>
</PersistentState>
diff --git a/app/src/main/java/Settings/CreditsPreferenceFragment.java b/app/src/main/java/Settings/CreditsPreferenceFragment.java
index 6bc3b467..55fb3363 100644
--- a/app/src/main/java/Settings/CreditsPreferenceFragment.java
+++ b/app/src/main/java/Settings/CreditsPreferenceFragment.java
@@ -25,7 +25,6 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat {
Preference iconForegroundPreference = findPreference(SharedPreferencesUtils.ICON_FOREGROUND_KEY);
Preference iconBackgroundPreference = findPreference(SharedPreferencesUtils.ICON_BACKGROUND_KEY);
Preference errorImagePreference = findPreference(SharedPreferencesUtils.ERROR_IMAGE_KEY);
- Preference placeholderPreference = findPreference(SharedPreferencesUtils.SUBREDDIT_AND_USER_PLACEHOLDER_KEY);
Preference gildedIconPreference = findPreference(SharedPreferencesUtils.GILDED_ICON_KEY);
Preference crosspostIconPreference = findPreference(SharedPreferencesUtils.CROSSPOST_ICON_KEY);
Preference thumbtackIconPreference = findPreference(SharedPreferencesUtils.THUMBTACK_ICON_KEY);
@@ -61,15 +60,6 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat {
});
}
- if(placeholderPreference != null) {
- placeholderPreference.setOnPreferenceClickListener(preference -> {
- Intent intent = new Intent(activity, LinkResolverActivity.class);
- intent.setData(Uri.parse("https://www.freepik.com/free-photos-vectors/technology"));
- startActivity(intent);
- return true;
- });
- }
-
if(gildedIconPreference != null) {
gildedIconPreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(activity, LinkResolverActivity.class);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/NotificationUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/NotificationUtils.java
index 7d09608f..f9e4bdee 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/NotificationUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/NotificationUtils.java
@@ -29,7 +29,8 @@ class NotificationUtils {
return new NotificationCompat.Builder(context.getApplicationContext(), channelId)
.setContentTitle(title)
.setContentText(content)
- .setSmallIcon(R.drawable.ic_launcher_foreground)
+ .setSmallIcon(R.drawable.ic_notification)
+ .setColor(context.getResources().getColor(R.color.notificationIconColor))
.setStyle(new NotificationCompat.BigTextStyle()
.setSummaryText(summary)
.bigText(content))
@@ -49,7 +50,8 @@ class NotificationUtils {
.setContentTitle(title)
//set content text to support devices running API level < 24
.setContentText(content)
- .setSmallIcon(R.drawable.ic_launcher_foreground)
+ .setSmallIcon(R.drawable.ic_notification)
+ .setColor(context.getResources().getColor(R.color.notificationIconColor))
.setGroup(group)
.setGroupSummary(true)
.setAutoCancel(true);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java
index d54e83cb..fd7dc27f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java
@@ -13,7 +13,6 @@ public class SharedPreferencesUtils {
public static final String ICON_FOREGROUND_KEY = "icon_foreground";
public static final String ICON_BACKGROUND_KEY = "icon_background";
public static final String ERROR_IMAGE_KEY = "error_image";
- public static final String SUBREDDIT_AND_USER_PLACEHOLDER_KEY = "subreddit_and_user_profile_placeholder";
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";
diff --git a/app/src/main/res/drawable/ic_notification.xml b/app/src/main/res/drawable/ic_notification.xml
new file mode 100644
index 00000000..50344c41
--- /dev/null
+++ b/app/src/main/res/drawable/ic_notification.xml
@@ -0,0 +1,19 @@
+<vector android:height="15.565753dp" android:viewportHeight="115.9"
+ android:viewportWidth="178.7" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#FFB026" android:pathData="M59.106,104.943C58.766,108.82 53.687,111.541 47.763,111.021C41.838,110.502 37.311,106.938 37.651,103.061C37.991,99.184 43.07,96.463 48.995,96.983C54.919,97.503 59.447,101.067 59.106,104.943Z"/>
+ <path android:fillColor="#FFB026" android:pathData="M102.258,107.79C102.258,112.269 96.306,115.9 88.963,115.9C81.62,115.9 75.668,112.269 75.668,107.79C75.668,103.311 81.62,99.68 88.963,99.68C96.306,99.68 102.258,103.311 102.258,107.79Z"/>
+ <path android:fillColor="#FFB026" android:pathData="M141.137,102.653C141.689,105.687 137.501,110.287 131.433,111.39C125.365,112.493 119.713,109.682 119.161,106.648C118.61,103.614 123.082,100.26 129.151,99.156C135.219,98.053 140.585,99.618 141.137,102.653Z"/>
+ <path android:fillColor="#5F63C0" android:pathData="M178.715,92.644C178.715,92.644 169.54,72.905 106.315,63.972L89.358,64.393L72.401,63.972C9.174,72.905 0,92.644 0,92.644C0,92.644 38.462,106.197 89.358,105.884C140.253,106.197 178.715,92.644 178.715,92.644Z"/>
+ <path android:fillColor="#FB4A4C" android:pathData="M160.126,87.258C160.586,88.959 158.603,90.975 155.696,91.761C152.79,92.546 150.062,91.804 149.602,90.103C149.142,88.402 151.125,86.386 154.031,85.6C156.938,84.815 159.666,85.557 160.126,87.258Z"/>
+ <path android:fillColor="#FB4A4C" android:pathData="M129.735,93.072C129.906,94.826 127.615,96.484 124.619,96.776C121.623,97.067 119.055,95.882 118.884,94.128C118.714,92.374 121.005,90.716 124.001,90.424C126.997,90.133 129.564,91.318 129.735,93.072Z"/>
+ <path android:fillColor="#FB4A4C" android:pathData="M94.136,95.857C94.148,97.619 91.717,99.064 88.706,99.084C85.696,99.105 83.245,97.692 83.234,95.93C83.222,94.168 85.653,92.723 88.663,92.703C91.674,92.683 94.124,94.095 94.136,95.857Z"/>
+ <path android:fillColor="#FB4A4C" android:pathData="M59.464,93.73C59.145,95.463 56.485,96.425 53.525,95.878C50.565,95.332 48.424,93.484 48.743,91.751C49.064,90.018 51.723,89.057 54.683,89.603C57.644,90.149 59.784,91.997 59.464,93.73Z"/>
+ <path android:fillColor="#FB4A4C" android:pathData="M28.996,86.395C28.766,88.142 26.159,89.24 23.175,88.846C20.189,88.453 17.957,86.717 18.187,84.97C18.418,83.223 21.023,82.126 24.009,82.52C26.993,82.913 29.225,84.648 28.996,86.395Z"/>
+ <path android:fillColor="#FFF0BB" android:pathData="M87.892,89.208C71.541,89.208 52.576,86.016 32.232,76.578L31.926,76.437L31.899,76.102C31.885,75.944 30.662,60.104 36.924,42.768C41.531,30.02 51.04,14.357 70.658,4.823C86.562,-2.907 105.645,-1.398 119.39,9.726C119.874,10.119 120.358,10.525 120.839,10.945C135.506,23.754 143.671,45.214 145.111,74.727L145.127,75.066L144.84,75.245C144.506,75.453 121.833,89.208 87.892,89.208Z"/>
+ <path android:fillColor="#00B57C" android:pathData="M135.72,63.151C133.991,58.451 131.692,53.135 128.687,47.958C130.489,47.266 131.774,45.531 131.774,43.485C131.774,40.833 129.623,38.682 126.97,38.682C125.592,38.682 124.358,39.271 123.482,40.201C115.263,29.671 103.321,21.651 86.15,23.975C71.072,26.016 60.61,32.117 53.363,39.96C52.507,39.174 51.376,38.682 50.122,38.682C47.47,38.682 45.32,40.833 45.32,43.485C45.32,45.208 46.234,46.706 47.595,47.554C41.177,57.863 38.687,69.633 37.831,79.02C56.055,86.562 73.052,89.208 87.892,89.208C113.061,89.208 132.023,81.648 140.284,77.653C139.118,73.269 137.626,68.338 135.72,63.151Z"/>
+ <path android:fillColor="#032560" android:pathData="M83.377,60.695C84.303,62.182 85.709,63.554 87.344,64.215C90.587,65.525 93.246,63.307 95.119,60.841C95.83,59.906 94.246,58.996 93.544,59.92C91.895,62.091 89.61,63.759 87.055,61.991C86.231,61.421 85.484,60.628 84.953,59.774C84.334,58.779 82.755,59.694 83.377,60.695Z"/>
+ <path android:fillColor="#032560" android:pathData="M77.686,50.012C77.686,51.161 76.754,52.093 75.606,52.093C74.457,52.093 73.525,51.161 73.525,50.012C73.525,48.863 74.457,47.931 75.606,47.931C76.754,47.931 77.686,48.863 77.686,50.012Z"/>
+ <path android:fillColor="#032560" android:pathData="M104.372,50.012C104.372,51.161 103.44,52.093 102.291,52.093C101.143,52.093 100.211,51.161 100.211,50.012C100.211,48.863 101.143,47.931 102.291,47.931C103.44,47.931 104.372,48.863 104.372,50.012Z"/>
+ <path android:fillColor="#FFAB3D" android:pathData="M76.298,58.828C76.298,60.866 74.422,62.518 72.108,62.518C69.794,62.518 67.918,60.866 67.918,58.828C67.918,56.79 69.794,55.139 72.108,55.139C74.422,55.139 76.298,56.79 76.298,58.828Z"/>
+ <path android:fillColor="#FFAB3D" android:pathData="M109.016,58.828C109.016,60.866 107.14,62.518 104.826,62.518C102.511,62.518 100.636,60.866 100.636,58.828C100.636,56.79 102.511,55.139 104.826,55.139C107.14,55.139 109.016,56.79 109.016,58.828Z"/>
+</vector>
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index a83bdede..000500bf 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -55,4 +55,6 @@
<color name="archivedTint">#B4009F</color>
<color name="lockedIconTint">#EE7302</color>
+
+ <color name="notificationIconColor">@color/colorPrimary</color>
</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index ecd92af2..64be0073 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -270,8 +270,6 @@
<string name="settings_credits_icon_background_summary">Background vector created by freepik - www.freepik.com</string>
<string name="settings_credits_error_image_title">Error Image</string>
<string name="settings_credits_error_image_summary">Technology vector created by freepik - www.freepik.com</string>
- <string name="settings_credits_subreddit_and_user_placeholder_title">Subreddit and User Placeholder</string>
- <string name="settings_credits_subreddit_and_user_placeholder_summary">Technology vector created by freepik - www.freepik.com</string>
<string name="settings_credits_gilded_icon_title">Gilded Icon</string>
<string name="settings_credits_gilded_icon_summary">Icon made by Freepik from www.flaticon.com</string>
<string name="settings_credits_crosspost_icon_title">Crosspost Icon</string>
diff --git a/app/src/main/res/xml/credits_preferences.xml b/app/src/main/res/xml/credits_preferences.xml
index d5a5f580..e630422b 100644
--- a/app/src/main/res/xml/credits_preferences.xml
+++ b/app/src/main/res/xml/credits_preferences.xml
@@ -18,11 +18,6 @@
android:summary="@string/settings_credits_error_image_summary" />
<Preference
- android:key="subreddit_and_user_placeholder"
- app:title="@string/settings_credits_subreddit_and_user_placeholder_title"
- android:summary="@string/settings_credits_subreddit_and_user_placeholder_summary" />
-
- <Preference
android:key="gilded_icon"
app:title="@string/settings_credits_gilded_icon_title"
android:summary="@string/settings_credits_gilded_icon_summary" />