From 0e6ede4515e83c008af5e1330805c013a75d9b83 Mon Sep 17 00:00:00 2001 From: Shiburagi Date: Wed, 19 Aug 2020 08:07:25 +0800 Subject: [PATCH] fix rtl --- drawerbehavior/build.gradle | 2 +- .../java/com/infideap/drawerbehavior/AdvanceDrawerLayout.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drawerbehavior/build.gradle b/drawerbehavior/build.gradle index c163e97..59a9316 100644 --- a/drawerbehavior/build.gradle +++ b/drawerbehavior/build.gradle @@ -42,7 +42,7 @@ dependencies { publish { def groupProjectID = 'com.infideap.drawerbehavior' def artifactProjectID = 'drawer-behavior' - def publishVersionID = '1.0.3' + def publishVersionID = '1.0.4' userOrg = 'infideap2' repoName = "Drawer-Behavior" diff --git a/drawerbehavior/src/main/java/com/infideap/drawerbehavior/AdvanceDrawerLayout.kt b/drawerbehavior/src/main/java/com/infideap/drawerbehavior/AdvanceDrawerLayout.kt index 0851bc6..3aab035 100644 --- a/drawerbehavior/src/main/java/com/infideap/drawerbehavior/AdvanceDrawerLayout.kt +++ b/drawerbehavior/src/main/java/com/infideap/drawerbehavior/AdvanceDrawerLayout.kt @@ -200,7 +200,8 @@ open class AdvanceDrawerLayout : DrawerLayout { val window = activity!!.window var isRtl = false if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { - isRtl = layoutDirection == View.LAYOUT_DIRECTION_RTL || window.decorView.layoutDirection == View.LAYOUT_DIRECTION_RTL || resources.configuration.layoutDirection == View.LAYOUT_DIRECTION_RTL + isRtl = layoutDirection == View.LAYOUT_DIRECTION_RTL +// || window.decorView.layoutDirection == View.LAYOUT_DIRECTION_RTL || resources.configuration.layoutDirection == View.LAYOUT_DIRECTION_RTL } for (i in 0 until frameLayout!!.childCount) { val child = frameLayout!!.getChildAt(i) as CardView