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

View.TEXT_DIRECTION_RTL is not working #26

Open
adnanul opened this issue Jul 26, 2016 · 0 comments
Open

View.TEXT_DIRECTION_RTL is not working #26

adnanul opened this issue Jul 26, 2016 · 0 comments

Comments

@adnanul
Copy link

adnanul commented Jul 26, 2016

If I use
flowTextView.setTextDirection(View.TEXT_DIRECTION_RTL);
it is not working at all

In Code:

FlowTextView flowTextView = (FlowTextView) layout.findViewById(R.id.ftv);
    imgContentSourceUrl = c.getImage();
    Ion.with(con).load(imgContentSourceUrl).intoImageView(iconimg);

                    Spanned html = Html.fromHtml(c.getContentObject());
                    flowTextView.setText(html);
                    flowTextView.setTextSize((float)30);
                    flowTextView.setTextDirection(View.TEXT_DIRECTION_RTL);
                    flowTextView.setGravity(Gravity.RIGHT);

In Xml:

<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:gravity="right"
    >
    <uk.co.deanwild.flowtextview.FlowTextView
        android:id="@+id/ftv"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp"
        android:layout_width="match_parent"
        android:textDirection="rtl"
        android:gravity="right"
        android:padding="5dip"

        android:layout_height="match_parent" >

        <ImageView
            android:id="@+id/img_icon"
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:padding="10dip"
            android:src="@drawable/icon"/>


    </uk.co.deanwild.flowtextview.FlowTextView>
</RelativeLayout>

I also asked in stackoverflow:
http://stackoverflow.com/questions/38681810/android-how-to-settext-direction-rtl-in-flowtextview

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

1 participant