Android Question Get objects out of an xml in the res folder

chrjak

Active Member
Licensed User
Longtime User
Hey

As I am searching for hours already i now ask the community

is there a way to get the color out of an color.xml file in res

<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="backgroundColor">#FFC441C4</color>
</resources>

I now want to get the color in my code
like:
Dim C as int = @Color/backgroundColor

Same with strings (e.g. @string/app_name) and so on
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…