Top "Android-color" questions

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
How do I create ColorStateList programmatically?

I am trying to create a ColorStateList programatically using this: ColorStateList stateList = new ColorStateList(states, colors); But I am not …

android android-color
Change color of the drop down arrow of Spinner in XML

As I wrote in my question, I want to change the color of the drop down arrow (the default arrow, …

android android-layout colors android-spinner android-color
How to darken a given color (int)

I have a function that takes a given color and I would like it to darken the color (reduce its …

android android-color
Change color of mask password selector

As you can see in the picture I have a android app with a black background and white text. However …

android android-textinputlayout android-color
How to add the gradient color in color . Xml

I am using a library . In which I am showing the activity used by my library I am using a …

android android-xml android-color
No resource found that matches the given name (at 'color' with value '@color/common_signin_btn_light_text_pressed')

I have built my app earlier using the Android studio 1.1. I had no problems then. After upgrading I am getting …

android android-studio android-color
How can I get the primary color from my app theme?

In my Android java code, how can I reference the color "colorPrimary" set in my theme? I have the following …

android android-xml android-theme android-styles android-color
How to randomly receive a Material Design Color?

Google has their Color - Guidelines, so how to randomly receive a color? Is there a way to specify a …

java android colors hex android-color
Couldn't resolve resource @color/colorAccent

I got this error. Would somebody know how to fix it. All i had written <?xml version="1.0" encoding="utf-8"?&…

android-layout android-color