TextView with SingleLine as true and Gravity as Center not passing the events to the ViewPager if it has a Click Event

android:singleLine="true" forces android:scrollHorizontally to be set to true, and according to my tests only if you change android:gravity (i.e. default gravity seems not to give this problem).

I solved this issue in a TextView by simply replacing android:singleLine="true" withandroid:maxLines="1"

After this change, I had no more problems with the ViewPager. Now it is scrolling as expected while touching elements with android:gravity="right".


via: http://stackoverflow.com/

Issue: TextView with SingleLine as true and Gravity as Center not passing the events to the ViewPager if it has a Click Event.

原文地址:https://www.cnblogs.com/veins/p/4047619.html