mathew-kurian / TextJustify-Android

:page_facing_up: Android Text Full Jusiftication / Wrapping / Justify / Hyphenate - V2.0
https://github.com/bluejamesbond/TextJustify-Android/wiki
Apache License 2.0
1.86k stars 369 forks source link

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

Open jeremiasdsa opened 7 years ago

jeremiasdsa commented 7 years ago

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?

saulobittencourt commented 7 years ago

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

jeremiasdsa commented 7 years ago

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! 🍻