Skip to content
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

feat: add badge icon for work profile apps #342

Merged
merged 5 commits into from
Nov 27, 2024

Conversation

kaanelloed
Copy link
Contributor

Add the work profile badge.

workprofilebadge

@falzonv falzonv added feature request Request for a new feature or option won't do/fix (see closure comment) This will not be worked on labels Nov 16, 2024
@falzonv
Copy link
Owner

falzonv commented Nov 16, 2024

Hello,

Interesting, I didn't know about getUserBadgedIcon.
However, since we are discussing about icon packs in other tickets, this would conflict with them by using the actual app icon instead of the replacement from the icon pack.

Currently there is indeed no immediate way to distinguish regular apps and work profile apps, but users can manually apply some workarounds such as putting all work profile apps in a dedicated folder, or renaming work profile apps to add something at the end of their names (or make them start with a "z" so they are at the end of the list).

It might be possible to handle it better (ex: adding a badge ourselves) but this would add much more complexity than this request and is not something I want to manage to be honest (see project status in ticket #314).

Sorry this will not be implemented.

Best regards.

@falzonv falzonv closed this Nov 16, 2024
@kaanelloed
Copy link
Contributor Author

kaanelloed commented Nov 18, 2024

Interesting, I didn't know about getUserBadgedIcon. However, since we are discussing about icon packs in other tickets, this would conflict with them by using the actual app icon instead of the replacement from the icon pack.

@falzonv The method I've chosen adds the badge to the icon provided, and doesn't use the default application icon.

https://developer.android.com/reference/android/content/pm/PackageManager#getUserBadgedIcon(android.graphics.drawable.Drawable,%20android.os.UserHandle)

It's a very simple change, and I thought it would be useful for the project and in its current state.

@falzonv falzonv removed the won't do/fix (see closure comment) This will not be worked on label Nov 27, 2024
@falzonv
Copy link
Owner

falzonv commented Nov 27, 2024

Hello @kaanelloed,

My bad, I must have been tired when reading the documentation because I thought this method was taking the original app icon and adding a badge to it.
This is indeed a very good addition, sorry for the misinterpretation.

Ideally the badge should also be affected by the possibly user-defined color tint if no icon pack is used, I will have a look on what needs to be changed for that.

Best regards.

@falzonv falzonv reopened this Nov 27, 2024
@falzonv falzonv removed the feature request Request for a new feature or option label Nov 27, 2024
@falzonv
Copy link
Owner

falzonv commented Nov 27, 2024

falzonv: Ideally the badge should also be affected by the possibly user-defined color tint if no icon pack is used, I will have a look on what needs to be changed for that.

This in fact a bit more convoluted than I thought for a feature most people probably never use (the color tint), let's forget about this point and keep it simple.

@falzonv falzonv merged commit e92a76b into falzonv:main Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants