Top "Android-resources" questions

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

How to use build types (debug vs release) to set different styles and app names?

Background On Android Studio, you can have different build types, each has its own configuration, similar to product-flavors (as shown …

android android-studio android-resources android-productflavors android-build-type
ResourcesCompat.getDrawable() vs AppCompatResources.getDrawable()

I'm a bit confused with these two APIs. ResourcesCompat.getDrawable(Resources res, int id, Resources.Theme theme) Return a drawable …

java android android-resources android-theme android-styles
Android: Why does getDimension and getDimensionPixelSize both return the same?

I find the methods getDimension and getDimensionPixelSize confusing. It would look to me as though getDimension would return the actual …

android android-resources
Error inflating class ImageButton

I have an app which has fragment and image button on that. The problem is it's working on and above 5.0 …

android android-resources android-imagebutton inflate-exception binary-xml
Sub folders in drawable resource folder?

I would like to create sub folders in drawable folder. I have a lot of file(such as png, xml) …

android drawable android-resources subdirectory
Controlling view visibility from a resources

I have a layout that contains two ImageViews. I want one of them to be visible in portrait and the …

android android-imageview android-view android-resources
How to place "&" in xml strings file in android studio

I have my xml string file like this: <string name="text1">ben & angie</string> But …

android string android-studio android-resources
How does one use Resources.getFraction()?

How do I store a fractional value like 3.1416 in resources? What to write in the XML and how to retrieve …

android android-resources
Reading assets or raw or resource files as a File object in Android

I have a jar file for which i need to pass file object. How can i pass resource or assets …

android file-handling android-resources
How to know smallest width (sw) of an android device?

I have 4 different devices: Asus tablet, screensize 7" Lenovo tablet, screensize 7" HTC mobile phone, screensize 5" HTC mobile phone, screensize 4.7" I want …

android android-resources android-screen-support