I have 6 TextViews in which I declared clickable. all TextViews access the same onClick method.
How can I get the foreground and background colors of the clicked TextView ?
I have 6 TextViews in which I declared clickable. all TextViews access the same onClick method.
How can I get the foreground and background colors of the clicked TextView ?
Straight forward without caring about anything.
public void onClick(View v) {
if (v instanceof TextView)
int colorOfSelectedTextView = ((TextView) v).getCurrentTextColor();
}