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

support for RTL Language #35

Open
razmaimon opened this issue Jun 28, 2015 · 4 comments
Open

support for RTL Language #35

razmaimon opened this issue Jun 28, 2015 · 4 comments
Assignees

Comments

@razmaimon
Copy link

when trying to use the widget with hebrew string in app:flw_labelText, the hint is positioned with an offset to the right
(causing the text to be trunced)
also, when the widget is in focus, the label position is also with offset

layout file in this example:

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">
    <FloatingLabelEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:drawablePadding="10dp"
        app:flw_labelText="טקסט בעברית" />
    <FloatingLabelEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:flw_labelText="טקסט פשוט שאמור להיות מימין" />
</LinearLayout>

see screenshot:
device-2015-06-28-080320

@razmaimon
Copy link
Author

*SOLVED BY:
adding in class DefaultLabelAnimator
in method: setLabelAnchored

after calculating the float values, add:

    ViewGroup.LayoutParams params = label.getLayoutParams();
    params.width = inputWidget.getWidth() - inputWidget.getPaddingLeft() - inputWidget.getPaddingRight();
    label.setLayoutParams(params);

@vpratfr
Copy link
Member

vpratfr commented Jul 1, 2015

Hi,

can you submit a pull request against the develop branch so that we can merge it easily?

I think the proper way to fix that would be to use paddingStart and paddingEnd instead of paddingLeft and paddingRight.

thanks for the report, good catch.

@razmaimon
Copy link
Author

i did...
i am not familiar with the whole gitHub stuff, so maybe i did it wrong....

http://www.ideomobile.com/

Raz Maimon / Project Manager, Dev. Team Leader
[email protected] /054-6539487

IdeoMobile
http://www.Ideomobile.com http://www.ideomobile.com/

On Wed, Jul 1, 2015 at 6:09 PM, Vincent Prat [email protected]
wrote:

Hi,

can you submit a pull request against the develop branch so that we can
merge it easily?

I think the proper way to fix that would be to use paddingStart and
paddingEnd instead of paddingLeft and paddingRight.

thanks for the report, good catch.


Reply to this email directly or view it on GitHub
#35 (comment)
.

@vpratfr
Copy link
Member

vpratfr commented Jul 8, 2015

Ok. Thanks, I'll have a look as soon as I get time.

@vpratfr vpratfr self-assigned this Jul 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants