Top "Android-resources" questions

Android resources - framework for providing different layouts or strings for android projects.

findViewById() returns null for Views in a Dialog

The problem is, no matter where or how I call for this layout's components, they always return null. setView(inflater.…

android nullpointerexception android-resources android-dialog findviewbyid
Accessing integer resources in xml

I have read this where found that how to access integer resources in java class but no docs for another …

android android-layout android-resources
Setting webview background image to a resource graphic in Android

I'm trying to set the background of a webview to a drawable image resource in Android. From the sdk it …

android android-webview android-ui android-resources
Packaging Android resource files within a distributable Jar file

I am working on some reusable Android code that I would like to distribute to other developers for use within …

android android-resources
How to read custom dimension attribute from java code

I made my custom component just putting few TextViews together. Now I want to be able to init my custom …

android android-layout android-resources
How can I convert the android resources int to a string. eg.: android.R.string.cancel?

How can I obtain the string value "cancel" from this resource int: android.R.string.cancel ? thank you

android android-resources
Android Studio 3.1 Cannot Resolve Symbol (Themes, Widget, attr, etc.)

I upgraded Android Studio today to 3.1, and now Android Studio says it cannot resolve symbols for most of the resources (…

android android-studio intellij-idea android-resources android-studio-3.1
How does the mapping between android resources and resources ID work?

It is magical for Android to locate the proper resource just through the R.id.XXX. AFAIK, the resources are …

android android-resources
XML within an Android string resource?

I was wondering if I could place XML within /res/values/strings.xml? I ask this because I am checking …

android xml string android-resources
error: cannot find symbol variable abc_ic_ab_back_mtrl_am_alpha

I added a Fragment to my Android Studio project using New > Fragment > Fragment (Blank). As a result when …

android android-layout android-studio drawable android-resources