<tfoot id='QWpug'></tfoot>

        <bdo id='QWpug'></bdo><ul id='QWpug'></ul>

      <i id='QWpug'><tr id='QWpug'><dt id='QWpug'><q id='QWpug'><span id='QWpug'><b id='QWpug'><form id='QWpug'><ins id='QWpug'></ins><ul id='QWpug'></ul><sub id='QWpug'></sub></form><legend id='QWpug'></legend><bdo id='QWpug'><pre id='QWpug'><center id='QWpug'></center></pre></bdo></b><th id='QWpug'></th></span></q></dt></tr></i><div id='QWpug'><tfoot id='QWpug'></tfoot><dl id='QWpug'><fieldset id='QWpug'></fieldset></dl></div>

      <small id='QWpug'></small><noframes id='QWpug'>

      1. <legend id='QWpug'><style id='QWpug'><dir id='QWpug'><q id='QWpug'></q></dir></style></legend>
      2. recyclerview 或 viewpager 上的 setRotationY(180) 在 Android 9(AP

        时间:2023-10-04

        <small id='etBIY'></small><noframes id='etBIY'>

        <legend id='etBIY'><style id='etBIY'><dir id='etBIY'><q id='etBIY'></q></dir></style></legend>

          • <bdo id='etBIY'></bdo><ul id='etBIY'></ul>

              <i id='etBIY'><tr id='etBIY'><dt id='etBIY'><q id='etBIY'><span id='etBIY'><b id='etBIY'><form id='etBIY'><ins id='etBIY'></ins><ul id='etBIY'></ul><sub id='etBIY'></sub></form><legend id='etBIY'></legend><bdo id='etBIY'><pre id='etBIY'><center id='etBIY'></center></pre></bdo></b><th id='etBIY'></th></span></q></dt></tr></i><div id='etBIY'><tfoot id='etBIY'></tfoot><dl id='etBIY'><fieldset id='etBIY'></fieldset></dl></div>
                  <tbody id='etBIY'></tbody>

                  <tfoot id='etBIY'></tfoot>
                  本文介绍了recyclerview 或 viewpager 上的 setRotationY(180) 在 Android 9(API 28)中创建滚动问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

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

                  I am managing RTL contents by implementing setRotationY for recyclerview and viewpagers but it seems that it is creating scroll/swipe issues in only devices with API 28 otherwise it is working perfectly fine. It is working perfectly fine if I remove setRotationY. Has anyone faced this issue? If so, how to solve it?

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

                  P.S. : Rotating 360f is not affecting the scroll but rotation 180f does.

                  推荐答案

                  我在 API 28 上遇到了 ViewPager 这个问题,因为 ViewPager.setRotatingY(180) 所以我可以支持 RTL,我尝试用 layoutDirection= 替换旋转语言环境",但它没有用.我找到了一个支持 RTL ViewPager 的库,这是一个链接 https://github.com/duolingo/rtl-viewpager.

                  I had this issue with ViewPager on API 28 because of ViewPager.setRotatingY(180) so that i can support RTL, I've tried replacing rotation with layoutDirection="locale", but it didn't work. I found a library for supporting RTL ViewPager here's a link https://github.com/duolingo/rtl-viewpager.

                  将其添加到依赖项并确保将 layoutDirection="locale" 添加到 RtlViewPager

                  Add it to dependencies and just make sure you add layoutDirection="locale" to the RtlViewPager

                  <com.duolingo.open.rtlviewpager.RtlViewPager
                          android:layoutDirection="locale"
                          android:keepScreenOn="true"
                          android:id="@+id/quranViewpager"
                          android:layout_width="match_parent"
                          android:layout_height="match_parent"
                          android:animateLayoutChanges="true"
                       />
                  

                  更新

                  ViewPager2 对区域设置友好,因此它会根据当前设备区域设置自动更改滑动方向.

                  ViewPager2 is locale friendly so it's automatically will change swipe direction according to the current device locale.

                  一些关于 ViewPager2 实现的有用链接:

                  Some helpful links on the implementation of ViewPager2:

                  Android 文档

                  示例

                  这篇关于recyclerview 或 viewpager 上的 setRotationY(180) 在 Android 9(API 28)中创建滚动问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:带有卡片堆栈的 Android 垂直视图寻呼机 下一篇:Navigation Drawer 和 SlidingTabLayout 如何一起实现?

                  相关文章

                    <i id='QH0gQ'><tr id='QH0gQ'><dt id='QH0gQ'><q id='QH0gQ'><span id='QH0gQ'><b id='QH0gQ'><form id='QH0gQ'><ins id='QH0gQ'></ins><ul id='QH0gQ'></ul><sub id='QH0gQ'></sub></form><legend id='QH0gQ'></legend><bdo id='QH0gQ'><pre id='QH0gQ'><center id='QH0gQ'></center></pre></bdo></b><th id='QH0gQ'></th></span></q></dt></tr></i><div id='QH0gQ'><tfoot id='QH0gQ'></tfoot><dl id='QH0gQ'><fieldset id='QH0gQ'></fieldset></dl></div>
                  1. <legend id='QH0gQ'><style id='QH0gQ'><dir id='QH0gQ'><q id='QH0gQ'></q></dir></style></legend>
                  2. <small id='QH0gQ'></small><noframes id='QH0gQ'>

                    <tfoot id='QH0gQ'></tfoot>

                      • <bdo id='QH0gQ'></bdo><ul id='QH0gQ'></ul>