diff --git a/library/build.gradle b/library/build.gradle index 4d4c8c7..8ddeba5 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -8,8 +8,8 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 28 - versionCode 12 - versionName "androidx.v0.0.9" + versionCode 13 + versionName "androidx.v0.0.10" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/library/src/main/java/com/ruffian/library/widget/helper/RBaseHelper.java b/library/src/main/java/com/ruffian/library/widget/helper/RBaseHelper.java index cdf80a7..c0abe5b 100644 --- a/library/src/main/java/com/ruffian/library/widget/helper/RBaseHelper.java +++ b/library/src/main/java/com/ruffian/library/widget/helper/RBaseHelper.java @@ -1384,14 +1384,15 @@ private void setRadius() { mBorderRadii[6] = mCornerRadius; mBorderRadii[7] = mCornerRadius; } else { - mBorderRadii[0] = mCornerRadiusTopLeft; - mBorderRadii[1] = mCornerRadiusTopLeft; - mBorderRadii[2] = mCornerRadiusTopRight; - mBorderRadii[3] = mCornerRadiusTopRight; - mBorderRadii[4] = mCornerRadiusBottomRight; - mBorderRadii[5] = mCornerRadiusBottomRight; - mBorderRadii[6] = mCornerRadiusBottomLeft; - mBorderRadii[7] = mCornerRadiusBottomLeft; + boolean isRtl = isRtl(); + mBorderRadii[0] = isRtl ? mCornerRadiusTopRight : mCornerRadiusTopLeft; + mBorderRadii[1] = isRtl ? mCornerRadiusTopRight : mCornerRadiusTopLeft; + mBorderRadii[2] = isRtl ? mCornerRadiusTopLeft : mCornerRadiusTopRight; + mBorderRadii[3] = isRtl ? mCornerRadiusTopLeft : mCornerRadiusTopRight; + mBorderRadii[4] = isRtl ? mCornerRadiusBottomLeft : mCornerRadiusBottomRight; + mBorderRadii[5] = isRtl ? mCornerRadiusBottomLeft : mCornerRadiusBottomRight; + mBorderRadii[6] = isRtl ? mCornerRadiusBottomRight : mCornerRadiusBottomLeft; + mBorderRadii[7] = isRtl ? mCornerRadiusBottomRight : mCornerRadiusBottomLeft; } mBackgroundNormal.setCornerRadii(mBorderRadii); mBackgroundPressed.setCornerRadii(mBorderRadii);