SimpleRatingBar icon indicating copy to clipboard operation
SimpleRatingBar copied to clipboard

no RTL support

Open Meqdadi opened this issue 6 years ago • 2 comments

when swiping on rating control with RTL screen the behaviour is not performing correctly as LTR screen

Meqdadi avatar Apr 08 '19 10:04 Meqdadi

Hi @Meqdadi, Thanks for raising this issue, I'll have a look.

williamyyu avatar Apr 24 '19 01:04 williamyyu

sadly, for now there is no built in sollution in library but you can try to rotate view, it seems to be working fine

class RTLRatingBar @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : BaseRatingBar(context, attrs, defStyleAttr) {

    init {
        if (TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == ViewCompat.LAYOUT_DIRECTION_RTL) {
            rotationY = 180f
        }
    }
}

mmalek95 avatar Aug 10 '20 07:08 mmalek95