setRotationY(180) on recyclerview or viewpager creating scroll issue in Android 9(API 28)

后端 未结 4 509
你的背包
你的背包 2021-01-15 09:08

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 othe

4条回答
  •  温柔的废话
    2021-01-15 09:13

    Check for the current version of SDK :

      if(Build.VERSION.SDK_INT >= 28) {
            // Call some material design APIs here
    
            recyclerView.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE);
    
        } else {
            // Implement this feature without material design
            recyclerView.setRotationY(180);
    
    
        }
    

提交回复
热议问题