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

Get drawable after selection #33

Closed
Ahsan221B opened this issue Mar 15, 2020 · 1 comment
Closed

Get drawable after selection #33

Ahsan221B opened this issue Mar 15, 2020 · 1 comment

Comments

@Ahsan221B
Copy link

I am using version 3.2.0 in Java-based activity. The user can only select one icon at a time. How do I get a drawable/image of that selected icon in the method onIconDialogIconsSelected? I want to display the selected icon in an image view.

@maltaisn
Copy link
Owner

Just use Icon.getDrawable() if the icons are already loaded (which is the case if they were shown in the dialog). This wil return a drawable that you can set on your image view.

You can also use IconPack.getIconDrawable(id, loader) if you're not sure if the icon pack is fully loaded yet, for example on application startup.

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

No branches or pull requests

2 participants