TextView textView = findViewById(R.id.text_view); textView.setTextColor(Color.BLACK); int textColor = textView.getCurrentTextColor();
TextView textView = findViewById(R.id.text_view); if (textView.getCurrentTextColor() == Color.WHITE) { // do something }This method is part of the android.widget package.