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

Making a tutorial to use "TextJustify-Android" #72

Closed hasnain-xperts closed 9 years ago

hasnain-xperts commented 9 years ago

Hi

Dear friend,

Can you write an article and video tutorial, how to use the TextJustify-Android library. I am facing problem while working with "DocumentView".

I got the following error " android.view.InflateException: Binary XML file line #11: Error inflating class com.bluejamesbond.text.DocumentView".

Waiting for your reply

Thanks in advance

Regards Hasnain Ahmad hasnain_ahmad@outlook.com

sigrlami commented 9 years ago

@hasnain-xperts you are probably using some specific xml attribure, here is minimal view that works on most of platforms

    <com.bluejamesbond.text.DocumentView
        android:id="@+id/textDescription"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="18dp"
        android:layout_marginRight="10dp"
        ext:documentView_textAlignment="justified"
        ext:documentView_textColor="@android:color/darker_gray"
        ext:documentView_textFormat="plain"
        ext:documentView_textSize="16sp"
        ext:documentView_insetPaddingLeft="0dp"
        ext:documentView_insetPaddingRight="0dp"/>

You can add one-by-one other needed attributes and figure out which one causing error

hasnain-xperts commented 9 years ago

Dear sigrlami I forget to write the id attribute in the view. so it can't rendering the result. Thanks for your reply. It works.

sigrlami commented 9 years ago

@hasnain-xperts congrats! :+1: @bluejamesbon can you close this issue?