alphamu / PinEntryEditText

An EditText that looks like a pin entry field. It is highly customisable and even animated text.
Apache License 2.0
669 stars 137 forks source link

support rtl #1

Closed xingstarx closed 8 years ago

xingstarx commented 8 years ago

I think this feature is need for this repo

xingstarx commented 8 years ago

Do you think it is necessary to use VIewCompat.getPaddingStart()? After my test I can think of two ways is ok

xingstarx commented 8 years ago

You are right , I will modify it in this weekend. thanks

xingstarx commented 8 years ago

afater my test ,when set paddingLeft or paddingStart in layout xml ,VIewCompat.getPaddingStart() value is same , when paddingLeft and paddingStart all set, the value we get by VIewCompat.getPaddingStart() is paddingStart

and below Build.VERSION_CODES.JELLY_BEAN_MR1 , not support rtl

and now , you need code review my code ...

If there is a bug, please tell me

xingstarx commented 8 years ago

should I need to rebase commit record?

alphamu commented 8 years ago

Looks good, I'll accept the changes. This only solves the problem of Alignment, however, the text is still display Left to Right. We could easily change this to display text Right to Left, however, some languages like Arabic, are written Right to Left, but their numbers are written Left to Right. Then other languages like Hebrew have text and numbers written right to left.

Since the widget supports both text and numbers, I'm not sure how to handle this currently.

alphamu commented 8 years ago

These changes have been deployed in release v1.1 along with updating the code to build for Android API 24.

xingstarx commented 8 years ago

In our team, we don't deal with special text and numbers Our products are Shou (https://play.google.com/store/apps/details?id=tv.shou.android)

it support rtl

As you said, it only solves the problem of Alignment.

I have an idea, FaceBook AccountKit with PinEntryEditText has a similar function https://developers.facebook.com/docs/accountkit/android You can run Facebook AccountKit sample , check Is it necessary to support text and numbers. and I will check next Monday

ps: my english is very poor,hope you do not mind.