Skip to content

Commit

Permalink
Fix #4413: Update placeholder launcher icon (#4576)
Browse files Browse the repository at this point in the history
## Explanation
Fixes #4413

This PR updates the placeholder launcher icon with something that better fits the adaptive icon expectations.

Note that this PR is removing the rounded icon per the advice of the adaptive icon support page (that it should be preferred not to be used unless necessary), and it's removing the play store icon since it shouldn't be needed. It's also inverting the colors of the icon since that seems to be less visually jarring for the circle-in-circle icon cases.

Note that this PR is introducing more binary files to the history, but they're small. Longer term we can look into rendering these PNGs during build time, but it's not an option right now.

## Essential Checklist
- [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
- [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation.
- [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## For UI-specific PRs only
This section will be filled in post-merge (#4567 is tracking ensuring that the description is finished later).
  • Loading branch information
BenHenning authored Sep 9, 2022
1 parent 7ff4874 commit 9303af9
Show file tree
Hide file tree
Showing 29 changed files with 31 additions and 21 deletions.
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
<application
android:name=".app.application.dev.DeveloperOppiaApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/launcher_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/OppiaTheme">
<!-- NOTE TO DEVELOPER: You can enable debug logs for fast upload & better inspection in Firebase console using https://support.google.com/analytics/answer/7201382. -->
Expand Down
Binary file removed app/src/main/ic_launcher-web.png
Binary file not shown.
5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

This file was deleted.

23 changes: 23 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/launcher_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background>
<color android:color="#FFFFFF" />
</background>
<foreground>
<vector
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group
android:scaleX="0.08046576"
android:scaleY="0.08046576"
android:translateX="10.548493"
android:translateY="10.146164">
<path
android:fillColor="#1AAA9D"
android:pathData="M792.1,291.7c-61.3,-69.7 -158.2,-107.3 -254.5,-107.3c-94.7,0 -174.3,28.8 -235.4,95.8c-58.8,64.5 -95.8,161.1 -95.8,258.9C206.4,738.3 351.9,904 537.6,904c94.4,0 185.3,-38.1 246.4,-105.3c59.2,-65 90,-157.5 90,-255.6C873.9,447.3 849,356.3 792.1,291.7zM709.5,722.8c-42.2,46.4 -105.1,72.8 -170.3,72.8c-2.7,0 -5.4,-0.1 -8.1,-0.2c2.7,-23.6 20.3,-78.7 26.8,-95.9c8.1,-21.6 29.6,-48 29.6,-48l22.7,-23.1c9.1,14.2 25,23.6 43.1,23.6c28.3,0 51.2,-22.9 51.2,-51.2s-22.9,-51.2 -51.2,-51.2s-51.2,22.9 -51.2,51.2c0,6.8 1.4,13.3 3.8,19.3l-26.2,26.6c0,0 -19.3,22.1 -29.6,48c-6.3,15.8 -21.8,64.7 -26,90.5c0.6,-46.2 7.4,-174.6 11.3,-215.3c4.1,-43.5 19.7,-70.9 22.9,-76.1c4.8,1.5 10,2.3 15.3,2.3c28.3,0 51.2,-22.9 51.2,-51.2s-22.9,-51.2 -51.2,-51.2s-51.2,22.9 -51.2,51.2c0,18.8 10.2,35.3 25.4,44.1c-2.9,5.1 -18.2,33.4 -22.4,77.3c-4.2,44.5 -11.2,195.5 -10.4,227.9c-0,0 -0,0 -0,0c-0.7,-9 -6.2,-79.4 -18.9,-122.3c-10.4,-35.2 -31.3,-68.4 -40.5,-82.1c13.7,-9.2 22.7,-24.8 22.7,-42.5c0,-28.3 -22.9,-51.2 -51.2,-51.2c-28.3,0 -51.2,22.9 -51.2,51.2s22.9,51.2 51.2,51.2c7.6,0 14.8,-1.7 21.3,-4.7c10.3,15.6 29.4,47.2 39.1,79.9c12.1,40.9 17.3,105.5 18.3,119.3c-112,-17.9 -195.5,-124 -195.5,-249.6c0,-67.6 25.6,-134.4 66.3,-179c42.3,-46.3 97.3,-66.3 162.7,-66.3c66.6,0 133.6,26 176,74.2c39.3,44.7 56.5,107.6 56.5,173.8C771.7,614 750.4,677.9 709.5,722.8z" />
</group>
</vector>
</foreground>
</adaptive-icon>
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-hdpi/launcher_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-mdpi/launcher_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xhdpi/launcher_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/launcher_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxxhdpi/launcher_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion app/src/main/res/values/colors_migrating.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<color name="concept_card_background">#FFFFF0</color>
<color name="concept_toolbar_background">#BE563C</color>
<color name="concept_toolbar_heading">#A6503A</color>
<color name="ic_launcher_background">#26A69A</color>
<!-- OPPIA COLORS -->
<color name="oppia_primary_text">#333333</color>
<color name="oppia_primary_light">#009688</color>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1700,9 +1700,9 @@ class AddProfileActivityTest {
val resources: Resources = context.resources
val imageUri = Uri.parse(
ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
resources.getResourcePackageName(R.mipmap.ic_launcher) + '/' +
resources.getResourceTypeName(R.mipmap.ic_launcher) + '/' +
resources.getResourceEntryName(R.mipmap.ic_launcher)
resources.getResourcePackageName(R.mipmap.launcher_icon) + '/' +
resources.getResourceTypeName(R.mipmap.launcher_icon) + '/' +
resources.getResourceEntryName(R.mipmap.launcher_icon)
)
val resultIntent = Intent()
resultIntent.data = imageUri
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -775,9 +775,9 @@ class ProfileProgressFragmentTest {
val resources: Resources = context.resources
val imageUri = Uri.parse(
ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
resources.getResourcePackageName(R.mipmap.ic_launcher) + '/' +
resources.getResourceTypeName(R.mipmap.ic_launcher) + '/' +
resources.getResourceEntryName(R.mipmap.ic_launcher)
resources.getResourcePackageName(R.mipmap.launcher_icon) + '/' +
resources.getResourceTypeName(R.mipmap.launcher_icon) + '/' +
resources.getResourceEntryName(R.mipmap.launcher_icon)
)
val resultIntent = Intent()
resultIntent.data = imageUri
Expand Down
3 changes: 1 addition & 2 deletions instrumentation/src/java/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
<application
android:name=".instrumentation.application.TestOppiaApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/launcher_icon"
android:label="@string/app_name"
tools:replace="android:name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/OppiaTheme"
android:usesCleartextTraffic="true">
Expand Down

0 comments on commit 9303af9

Please sign in to comment.