android edittext underline color code example

Example 1: edittext color

<EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Underline color change"
        android:backgroundTint="@android:color/holo_red_light" />  -this line-

Example 2: android kotlin change text color

// Android kotlin changing text color

// like this
android:textColor="#454545"

Example 3: text.settextcolor android

//From API 23 onward, getResources().getColor() is deprecated.
textView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.color_black));

Tags:

Misc Example