R.drawable.XXX #3889
craigcunic-creator
started this conversation in
Debugging help
R.drawable.XXX
#3889
Replies: 2 comments 1 reply
-
|
There are examples of Drawable usage in the Android backend - for example this use of R.drawable.ic_dialog_alert (and the original import) To provide any assistance beyond that, we'll need a little more detail on what you've done, and what you've tried. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Got it thank you
…________________________________
From: Malcolm Smith ***@***.***>
Sent: Monday, November 17, 2025 3:59:59 AM
To: beeware/toga ***@***.***>
Cc: craigcunic-creator ***@***.***>; Author ***@***.***>
Subject: Re: [beeware/toga] R.drawable.XXX (Discussion #3889)
If you're attempting to use the app's own icon, then instead of from android import R, you'll probably want from your.application.id import R, where your application ID is the combination of the bundle<https://briefcase.beeware.org/en/stable/reference/configuration.html#bundle> and app name<https://briefcase.beeware.org/en/stable/reference/configuration.html#tool-briefcase-app-app-name> from your pyproject.toml file. The app's icon should then be something like R.drawable.ic_launcher<https://github.com/beeware/briefcase-android-gradle-template/blob/main/%7B%7B%20cookiecutter.format%20%7D%7D/app/src/main/AndroidManifest.xml#L18>.
—
Reply to this email directly, view it on GitHub<#3889 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BVDD5GTEUHHGSUEWCRE46H335GFA7AVCNFSM6AAAAACMFSJ63WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIOJYG4ZTANI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to do a small bit of Android native code to post a notification
I need to call a method for setSmallIcon(icon) that takes a resource id for an icon
I can't seem to find a way to make any of the suggested approaches to work.
In particular R.drawable.XXX yields an exception saying the R$drawable does not contain the icon name
I think I may be missing something in the pyproject.toml for mapping the correct folder but I can't seem to
determine what it is.
Beta Was this translation helpful? Give feedback.
All reactions