-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom icon preference for sustainers #1645
Conversation
…ces methods for testing.
… icon when enabled.
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in Simplenote Android by scanning the QR code below to install the corresponding build.
|
Thanks, @roundhill ! It mostly works well, but I found a couple of issues :)
|
Intent intent = new Intent(); | ||
intent.setComponent(new ComponentName(packageName, getMainActivityClassName(context))); | ||
|
||
return intent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this function to get the proper main activity, if it is the alias or not. This fixes the back button crash and probably some other scenarios where we were referring directly to the NotesActivity
class which may or may not exist depending on if the activity alias for the sustainer icon is active.
I think it does do it but it takes a while (at least on the emulator it does). I've updated the requirement to show the switch to API 28 because I was getting an exception that I couldn't track down:
This should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes, @roundhill ! Works great now 👍
Fix
This PR adds a new preference in the settings for sustainers to set a green app icon:
Changing the icon is kind of a pain on Android involving
activity-alias
to use a different drawable for the (gulp) main activity. From my testing it is working pretty well but does crash the app when you swap out the activities.I also couldn't get the "New Note" shortcut to work, so just left that out when switching to the activity-alias.
Test
Release
These changes do not require release notes.