Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no RTL support #72

Open
Meqdadi opened this issue Apr 8, 2019 · 2 comments
Open

no RTL support #72

Meqdadi opened this issue Apr 8, 2019 · 2 comments

Comments

@Meqdadi
Copy link

Meqdadi commented Apr 8, 2019

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

@williamyyu
Copy link
Owner

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

@mmalek95
Copy link

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
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants