其他分享
首页 > 其他分享> > recyclerview或viewpager上的setRotationY(180)在Android 9(API 28)中创建滚动问题

recyclerview或viewpager上的setRotationY(180)在Android 9(API 28)中创建滚动问题

作者:互联网

我正在通过为recyclerview和viewpagers实现setRotationY来管理RTL内容,但似乎它仅在具有API 28的设备中创建滚动/滑动问题,否则它工作得很好.如果我删除setRotationY,它的工作就很好.有人遇到过这个问题吗?如果是这样,如何解决呢?

附: :旋转360f不会影响滚动,但是旋转180f会影响滚动.

解决方法:

您还可以在您的recyclerview或viewpager中使用layoutDirection,例如:

 <android.support.v4.view.ViewPager
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layoutDirection="locale"/>

或膨胀的视图.
因此它将完美地工作.

标签:android-9-0-pie,android,android-recyclerview,android-viewpager
来源: https://codeday.me/bug/20191013/1909103.html