I have a ViewPager with autoscrollable TextView inside of it. When I slide to see the next page, instead of sliding, detects the event as a scroll of the TextView.
How can I avoid this?
<TextView
android:gravity="center_horizontal"
android:id="@+id/main_card_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:textColor="@color/black"
android:ellipsize="marquee" />
Then, in my Java code I do:
tvName.setSingleLine(true);
tvName.setSelected(true);
And this TextView is in a page of a ViewPager. When I slide the page to go to the next page, instead of this what happens is that behaves like if I was doing scroll inside of the TextView.
you can disable autoscroll event of textview ontouch event .