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

TextView text rendering problem - text is cut off #39

Closed
littledot opened this issue May 17, 2016 · 2 comments
Closed

TextView text rendering problem - text is cut off #39

littledot opened this issue May 17, 2016 · 2 comments
Assignees

Comments

@littledot
Copy link

Hope I'm using Flexbox correctly, but I occasionally see TextView within a Flexbox render text incorrectly.

screenshot_2016-05-17-08-46-01
Samsung S6; OS 5.1.1
flexbox-bug
Emulator; OS 6

To repro, add this layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <View
        android:layout_width="4dp"
        android:layout_height="match_parent"
        android:background="@color/primary1"/>

    <com.google.android.flexbox.FlexboxLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="4dp"
        android:paddingEnd="8dp"
        android:paddingLeft="8dp"
        android:paddingRight="8dp"
        android:paddingStart="8dp"
        android:paddingTop="4dp"
        app:flexWrap="wrap">

        <TextView
            android:id="@+id/content"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:textSize="14sp"
            app:layout_flexBasisPercent="100%"/>

    </com.google.android.flexbox.FlexboxLayout>
</LinearLayout>

and Activity

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.comment_item_layout);
        TextView tv3 = (TextView) findViewById(R.id.content);
        tv3.setText(Html.fromHtml("<p>Since we&#x27;re on the subject of hard drives, I hope this will be helpful or " +
                "interesting:<p>It has been our experience that it is no longer possible to buy new, non-fraudulant " +
                "drives of <i>a sort of recent, but not brand new</i> drive model from Amazon.<p>So, for instance, in" +
                " early 2016 if you want to buy 4TB enterprise drives from Amazon, you will find them, they will be " +
                "classified as brand new, and they will be sold by some big amazon parts seller.<p>When you receive " +
                "them they will be nice and shiny brand new wrapped - perfectly sealed - and when you spin them up, " +
                "SMART stats will show 4000-6000 hours of use and that they are 2-3 years old.<p>This is almost " +
                "universal and has been happening for at least 3-4 years. These sellers are selling the drives as " +
                "brand new and they are anything but. When you complain, they will immediately exchange or refund - " +
                "there&#x27;s never a hassle there - and once in a while the seller will spout some bullshit about " +
                "the drives being &quot;new pulls&quot; ... that is, drives they stripped from unsold servers&#x2F;" +
                "desktops.<p>Hope that helps."));
    }
}

Support Lib Version: 23.3.0; CompileSDK 23; TargetSDK 22

@thagikura
Copy link
Contributor

Thanks for reporting. I'll have a look to see if it's a bug with the FlexboxLayout

@thagikura thagikura self-assigned this May 18, 2016
@thagikura
Copy link
Contributor

I think this issue was caused by #36.
If so, it should be fixed by the 0.1.3 version of the library.

I was able to reproduce the issue with the 0.1.2 version and verified that the issue was fixed with the 0.1.3 version of the library.
Closing this. If it still persists, please re-open it.

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