mathew-kurian/TextJustify-Android

com.bluejamesbond.text.StringDocumentLayout$PlainDocumentException: Cannot fit word(s) into one line. Font size too large?

jeremiasdsa opened this issue · 2 comments

Hi,

I'm using setText() and it isn't displaying my text. Also I'm getting this messaging warning:
com.bluejamesbond.text.StringDocumentLayout$PlainDocumentException: Cannot fit word(s) into one line. Font size too large.

<com.bluejamesbond.text.DocumentView xmlns:ext="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" android:layout_height="match_parent" android:id="@+id/tv_dc_about" ext:documentView_antialias="true" ext:documentView_textAlignment="justified" ext:documentView_textFormat="plain" ext:documentView_textColor="@color/colorTextInfoDetail" ext:documentView_cacheConfig="no_cache"> </com.bluejamesbond.text.DocumentView>

There is a way to tell my document to break this line if it happend?

Hey guys, i have the same problem. Any help? tks

Hey,

After try so hard, I got a way to solve this.

  1. Copy and paste this class PressableDocumentView.java from "helper" folder.
  2. Instead of "<com.bluejamesbond.text.DocumentView" use this: "com.bluejamesbond.text.PressableDocumentView". on your xml.
  3. Vualá!! It's woking! 🍻