Top "Android-resources" questions

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

Load dimension value from res/values/dimension.xml from source code

I'd like to load the value as it is. I have two dimension.xml files, one in /res/values/dimension.…

android android-resources dpi dimension
getResources().getColor() is deprecated

Using: buildToolsVersion "22.0.1" , targetSdkVersion 22 in my gradle file. I found that the useful getResources().getColor(R.color.color_name) is deprecated. …

android deprecated android-resources android-color
Failed linking file resources

This is the java file that is giving the error package com.example.daksh.timetable; import android.support.v7.app.…

android-resources android-studio-3.0
getString Outside of a Context or Activity

I've found the R.string pretty awesome for keeping hardcoded strings out of my code, and I'd like to keep …

java android string android-resources android-context
Remove all unused resources from an android project

I want to remove all unused layouts, strings, drawables, colors, etc from my Android res directory. Are there any tools …

android android-resources
Android, getting resource ID from string?

I need to pass a resource ID to a method in one of my classes. It needs to use both …

java android resources android-resources
String Resource new line /n not possible?

It doesn't seem like it's possible to add a new line /n to an XML resource string. Is there another …

android xml android-layout newline android-resources
Can the Android drawable directory contain subdirectories?

In the Android SDK documentation, all of the examples used with the @drawable/my_image xml syntax directly address images …

android drawable android-resources
How can I assign an ID to a view programmatically?

In an XML file, we can assign an ID to a view like android:id="@+id/something" and then call …

android android-view android-resources findviewbyid android-identifiers
Android - How to regenerate R class?

Possible Duplicate: Developing for Android in Eclipse: R.java not generating I have imported a project into my Eclipse IDE, …

android android-resources