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

Direction #2

Open
Samira6488 opened this issue Dec 27, 2023 · 2 comments
Open

Direction #2

Samira6488 opened this issue Dec 27, 2023 · 2 comments

Comments

@Samira6488
Copy link

Hello, thanks for your library.
I used it in my project.
I saw a problem.
I configured the direction of project in my theme file.
it was like this: rtl,
but I wanted to set the direction of OTPTextView to Left-to-right.
Unfortunately, it didn't apply. why? what is problem.
It is important to say you, I could change the direction of other components easily.
could you solve your problem?
thanks in advance

@appsfeature
Copy link
Owner

appsfeature commented Dec 27, 2023

Are you trying this code android:layoutDirection="ltr" in your OTPTextView
<com.otpview.OTPTextView
...
android:layoutDirection="ltr"
/>

@Samira6488
Copy link
Author

Yes, I did, but it didn't apply because
I have set bottom style in my themes file:

<style name="Base.Theme.Sample" parent="Theme.Material3.DayNight.NoActionBar">
    <!-- Customize your light theme here. -->
    <item name="fontFamily">@font/vazirmatn</item>
    <item name="android:layoutDirection">rtl</item>
    <item name="android:direction">right_to_left</item>
    <item name="android:textDirection">rtl</item>
    <!-- <item name="colorPrimary">@color/my_light_primary</item> -->
</style>

When I removed rtl from theme
bottom lines was applied very well
<com.otpview.OTPTextView
...
android:layoutDirection="ltr"
/>
but I don't want to remove rtl from theme
do you have any idea or solution?

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

2 participants