Answers for "how to set textview background color in android programmatically"

4

change color of text in textview android

TextView text = (TextView) findViewById(R.id.text);
text.setTextColor(Color.parseColor("#FFFFFF"));
Posted by: Guest on August-20-2020
0

how to change background tint color programmatically android

Drawable buttonDrawable = button.getBackground();
    buttonDrawable = DrawableCompat.wrap(buttonDrawable);
    //the color is a direct color int and not a color resource
    DrawableCompat.setTint(buttonDrawable, Color.RED);
    button.setBackground(buttonDrawable);
Posted by: Guest on February-05-2021

Code answers related to "how to set textview background color in android programmatically"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language