Skip to content

Commit

Permalink
Merge pull request #415 from Automattic/update/halloween-icon
Browse files Browse the repository at this point in the history
Added a Halloween icon
  • Loading branch information
ashiagr authored Oct 19, 2022
2 parents c8d48f9 + 4205749 commit 21cf92b
Show file tree
Hide file tree
Showing 44 changed files with 68 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
7.26
-----

* New Features:
* Added a Halloween icon.
([#415](https://github.com/Automattic/pocket-casts-android/pull/415)).

7.25
-----
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,18 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".ui.MainActivity_13"
android:label="@string/app_name"
android:targetActivity=".ui.MainActivity"
android:enabled="false"
android:exported="true"
android:icon="@mipmap/ic_launcher_halloween">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>

<activity android:name=".profile.sonos.SonosAppLinkActivity" android:label="@string/profile_sonos"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class AppearanceIconSettingsAdapter(
val showOption = !appIcon.isPlus || isPlusSignedIn
binding.appIconItem.alpha = if (showOption) 1.0f else 0.65f

val drawable = AppCompatResources.getDrawable(itemView.context, appIcon.resourceId)
val drawable = AppCompatResources.getDrawable(itemView.context, appIcon.settingsIcon)
binding.imgIcon.setImageDrawable(drawable)
var tickDrawable: Drawable? = null
if (showOption && selected) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="432dp"
android:height="432dp"
android:viewportWidth="432"
android:viewportHeight="432">
<path
android:pathData="M126,216C126,166.29 166.29,126 216,126C265.71,126 306,166.29 306,216H283.5C283.5,178.72 253.28,148.5 216,148.5C178.72,148.5 148.5,178.72 148.5,216C148.5,253.28 178.72,283.5 216,283.5V306C166.29,306 126,265.71 126,216ZM216,270C186.18,270 162,245.82 162,216C162,186.18 186.18,162 216,162C245.82,162 270,186.18 270,216H250.36C250.36,197.02 234.98,181.64 216,181.64C197.02,181.64 181.64,197.02 181.64,216C181.64,234.98 197.02,250.36 216,250.36V270Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M272.77,242.73C274.03,236.14 271.63,230.75 269.97,228.01C268.67,227.9 265.38,228.5 263.51,230.21C265.51,232.06 268.55,235.84 270.19,242.69C270.54,242.67 270.89,242.6 271.24,242.6C271.76,242.6 272.26,242.68 272.77,242.73V242.73ZM297.77,251.64C295.94,249.41 289.13,243.22 279.51,244.78C286.08,248.75 287.97,255.26 287.97,255.26C287.97,255.26 282.68,246.12 271.42,246.12C260.14,246.12 254.85,255.26 254.85,255.26C254.85,255.26 256.91,248.75 263.49,244.78C253.87,243.22 247.05,249.41 245.24,251.64C240.59,257.34 238,265.16 238,272.8C238,291.11 253.03,306 271.5,306C289.98,306 305,291.11 305,272.8C305,265.16 302.42,257.34 297.77,251.64H297.77ZM271.52,272.71L275.53,279.81H267.52L271.52,272.71ZM266.86,268.33C266.86,268.33 264.58,274.27 259.88,277.04C251.76,272.26 248.98,262.2 248.98,262.2C253.16,265.34 259.67,267.89 266.86,268.33L266.86,268.33ZM281.95,295.11L280.76,293.93L277.21,296.13L275.78,294.64L271.43,297.13L267.07,294.64L265.65,296.13L262.1,293.93L260.91,295.11C253.35,291.19 251.24,281.97 251.24,281.97C254.89,286.35 262.02,288.12 262.02,288.12L263.45,285.87L267.67,287.68L271.43,285.11L275.19,287.68L279.42,285.87L280.84,288.12C280.84,288.12 287.97,286.35 291.61,281.97C291.62,281.97 289.5,291.19 281.95,295.11H281.95ZM283.13,277.04C278.42,274.27 276.15,268.33 276.15,268.33C283.33,267.89 289.84,265.34 294.03,262.21C294.02,262.2 291.24,272.26 283.13,277.04L283.13,277.04Z"
android:fillColor="#ffffff"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_halloween_background"/>
<foreground android:drawable="@mipmap/ic_launcher_halloween_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_halloween_monochrome" />
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_halloween_background"/>
<foreground android:drawable="@mipmap/ic_launcher_halloween_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,7 @@
<string name="settings_app_icon_electric_blue">Electric Blue</string>
<string name="settings_app_icon_electric_pink">Electric Pink</string>
<string name="settings_app_icon_radioactivity" translatable="false">@string/settings_theme_radioactivity</string>
<string name="settings_app_icon_halloween">Halloween</string>
<string name="settings_support_please_wait">Please wait just a moment while we collect details to help our support team</string>
<string name="settings_no_email_app_title">Unable to email</string>
<string name="settings_no_email_app">Please check you have an email app installed.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,110 +23,118 @@ class AppIcon @Inject constructor(
@PublicSharedPreferences private val sharedPreferences: SharedPreferences
) {

enum class AppIconType(val id: String, @StringRes val labelId: Int, @DrawableRes val resourceId: Int, val isPlus: Boolean, @DrawableRes val launcherIcon: Int, val aliasName: String) {
enum class AppIconType(val id: String, @StringRes val labelId: Int, @DrawableRes val settingsIcon: Int, val isPlus: Boolean, @DrawableRes val launcherIcon: Int, val aliasName: String) {
DEFAULT(
id = "default",
labelId = LR.string.settings_app_icon_default,
resourceId = IR.drawable.ic_appicon0,
settingsIcon = IR.drawable.ic_appicon0,
isPlus = false,
launcherIcon = IR.mipmap.ic_launcher,
aliasName = ".ui.MainActivity_0"
),
DARK(
id = "dark",
labelId = LR.string.settings_app_icon_dark,
resourceId = IR.drawable.ic_appicon1,
settingsIcon = IR.drawable.ic_appicon1,
isPlus = false,
launcherIcon = IR.mipmap.ic_launcher_1,
aliasName = ".ui.MainActivity_1"
),
ROUND_LIGHT(
id = "roundedLight",
labelId = LR.string.settings_app_icon_round_light,
resourceId = IR.drawable.ic_appicon2,
settingsIcon = IR.drawable.ic_appicon2,
isPlus = false,
launcherIcon = IR.mipmap.ic_launcher_2,
aliasName = ".ui.MainActivity_2"
),
ROUND_DARK(
id = "roundedDark",
labelId = LR.string.settings_app_icon_round_dark,
resourceId = IR.drawable.ic_appicon3,
settingsIcon = IR.drawable.ic_appicon3,
isPlus = false,
launcherIcon = IR.mipmap.ic_launcher_3,
aliasName = ".ui.MainActivity_3"
),
INDIGO(
id = "indigo",
labelId = LR.string.settings_app_icon_indigo,
resourceId = IR.drawable.ic_appicon_indigo,
settingsIcon = IR.drawable.ic_appicon_indigo,
isPlus = false,
launcherIcon = IR.mipmap.ic_launcher_indigo,
aliasName = ".ui.MainActivity_9"
),
ROSE(
id = "rose",
labelId = LR.string.settings_app_icon_rose,
resourceId = IR.drawable.appicon_rose,
settingsIcon = IR.drawable.appicon_rose,
isPlus = false,
launcherIcon = IR.mipmap.ic_launcher_rose,
aliasName = ".ui.MainActivity_12"
),
CAT(
id = "cat",
labelId = LR.string.settings_app_icon_pocket_cats,
resourceId = IR.drawable.ic_appicon_pocket_cats,
settingsIcon = IR.drawable.ic_appicon_pocket_cats,
isPlus = false,
launcherIcon = IR.mipmap.ic_launcher_cat,
aliasName = ".ui.MainActivity_10"
),
REDVELVET(
id = "redvelvet",
labelId = LR.string.settings_app_icon_red_velvet,
resourceId = IR.drawable.appicon_red_velvet,
settingsIcon = IR.drawable.appicon_red_velvet,
isPlus = false,
launcherIcon = IR.mipmap.ic_launcher_redvelvet,
aliasName = ".ui.MainActivity_11"
),
PLUS(
id = "plus",
labelId = LR.string.settings_app_icon_plus,
resourceId = IR.drawable.ic_appicon4,
settingsIcon = IR.drawable.ic_appicon4,
isPlus = true,
launcherIcon = IR.mipmap.ic_launcher_4,
aliasName = ".ui.MainActivity_4"
),
CLASSIC(
id = "classic",
labelId = LR.string.settings_app_icon_classic,
resourceId = IR.drawable.ic_appicon5,
settingsIcon = IR.drawable.ic_appicon5,
isPlus = true,
launcherIcon = IR.mipmap.ic_launcher_5,
aliasName = ".ui.MainActivity_5"
),
ELECTRIC_BLUE(
id = "electricBlue",
labelId = LR.string.settings_app_icon_electric_blue,
resourceId = IR.drawable.ic_appicon6,
settingsIcon = IR.drawable.ic_appicon6,
isPlus = true,
launcherIcon = IR.mipmap.ic_launcher_6,
aliasName = ".ui.MainActivity_6"
),
ELECTRIC_PINK(
id = "electricPink",
labelId = LR.string.settings_app_icon_electric_pink,
resourceId = IR.drawable.ic_appicon7,
settingsIcon = IR.drawable.ic_appicon7,
isPlus = true,
launcherIcon = IR.mipmap.ic_launcher_7,
aliasName = ".ui.MainActivity_7"
),
RADIOACTIVE(
id = "radioactive",
labelId = LR.string.settings_app_icon_radioactivity,
resourceId = IR.drawable.appicon_radioactive,
settingsIcon = IR.drawable.appicon_radioactive,
isPlus = true,
launcherIcon = IR.mipmap.ic_launcher_radioactive,
aliasName = ".ui.MainActivity_8"
),
HALLOWEEN(
id = "halloween",
labelId = LR.string.settings_app_icon_halloween,
settingsIcon = IR.drawable.appicon_halloween,
isPlus = true,
launcherIcon = IR.mipmap.ic_launcher_halloween,
aliasName = ".ui.MainActivity_13"
);

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ open class ConfirmationDialog : BottomSheetDialogFragment() {
private var title: String? = null
private var summary: String? = null
@DrawableRes private var iconId: Int = 0
private lateinit var buttonType: ConfirmationDialog.ButtonType
var secondaryType: ConfirmationDialog.ButtonType? = null
private lateinit var buttonType: ButtonType
var secondaryType: ButtonType? = null
@AttrRes private var iconTintAttr: Int? = UR.attr.primary_icon_01
private var onConfirm: (() -> Unit)? = null
private var onSecondary: (() -> Unit)? = null
Expand All @@ -56,13 +56,13 @@ open class ConfirmationDialog : BottomSheetDialogFragment() {
null
} else if (episodeCount in 5..Settings.MAX_DOWNLOAD) {
ConfirmationDialog()
.setButtonType(ConfirmationDialog.ButtonType.Normal(resources.getString(LR.string.download_warning_button, episodeCount)))
.setButtonType(ButtonType.Normal(resources.getString(LR.string.download_warning_button, episodeCount)))
.setIconId(IR.drawable.ic_download)
.setTitle(resources.getString(LR.string.download_warning_title))
.setOnConfirm(onConfirm)
} else {
ConfirmationDialog()
.setButtonType(ConfirmationDialog.ButtonType.Normal(resources.getString(LR.string.download_warning_button, Settings.MAX_DOWNLOAD)))
.setButtonType(ButtonType.Normal(resources.getString(LR.string.download_warning_button, Settings.MAX_DOWNLOAD)))
.setIconId(IR.drawable.ic_download)
.setTitle(resources.getString(LR.string.download_warning_title))
.setSummary(resources.getString(LR.string.download_warning_limit_summary, Settings.MAX_DOWNLOAD))
Expand Down

0 comments on commit 21cf92b

Please sign in to comment.