About 679,000 results
Open links in new tab
  1. android - How to set the text color of TextView in code ... - Stack ...

    Jan 5, 2011 · In order to set color of a TextView, TextView.setTextColor(R.color.YOURCOLOR) is not enough! It has to be used like this – TextView myText = (TextView) …

  2. How to change Text Color of TextView in Android? - Tutorial Kart

    Android TextView Text Color - To change the color of text in TextView, you can set the color in layout XML file using textColor attribute or change the color dynamically in Kotlin file using …

  3. How to Set the Text Color of TextView in Code? - GeeksforGeeks

    Jul 17, 2022 · There are two methods of changing the color of a TextView and the code for that has been given in both Java and Kotlin Programming Language for Android, so it can be done …

  4. android - Set Background Color for a textview - Stack Overflow

    Mar 30, 2018 · You are setting a drawable file to your Textview. android:background="@drawable/rounded_corner" In your java code I think you need to set …

  5. Change clickable TextView's color on focus and click?

    If you want to set stateful color from code, you need to pass in ColorStateList as an argument to setTextColor passing an int to the method results in setting the color to all the states. It also …

  6. How To Set Text Color In Android Programmatically

    Mar 11, 2023 · In this article we will show you the solution of how to set text color in android programmatically, in TextView, you can change the color of the text by setting the textColor …

  7. How to Change Textview Color on Android Studio - passfolk.com

    Aug 19, 2023 · One of the easiest ways to change the color of a TextView in Android Studio is by editing its properties in XML. This method is beginner-friendly and requires minimal coding. …

  8. How to Set the Text Color of a TextView Programmatically in Android

    Jun 6, 2024 · Learn how to programmatically set the text color of a TextView in Android. Understand the correct parameters for setTextColor () and avoid common pitfalls.

  9. How To Set Text Color And Background Color In Android

    This example will tell you how to set the android.widget.TextView text foreground color and background color in source code. For other android UI components, it is similar to change …

  10. android - How can I change the color of a part of a TextView?

    Apr 18, 2018 · If you want to change a part of the text to the color you want, just put your text instead of "Masoud" or "Siahkali" and enter the color you want in the "color" section. String text …

Refresh