-1

I have one activity ,which has one textView Field , what I want when i reach mouse over that textView, the textView Value should be highlighted to show that it is clickable . I am new to android please help me .

  • 1
    by mouseover means when user touch screen of mobile? or you want to show app pc or laptop? – Shvet Apr 16 '16 at 05:29
  • by mouseover means when user touch that textView Field than that textView Field Value should be shown like it is clickable . – Shivani Agrawal Apr 16 '16 at 05:36
  • in android when user will touch its view app will execute its touch event first, there is a method called `setOnTouchListener()` which will show it as a clickable. but you have to implement `textview`'s onClickListener too. which will be executed immediately after touch event. So i suggest you dont need to use both at a time. – Shvet Apr 16 '16 at 05:40

1 Answers1

0

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 looks like your xml is not totally correct.

With XML its as easy as: android:textColor="@color/selector_txt"