To be honest, i've spent hours trying to find a way to make use of this library and to attached it to view.. it was so difficult, can you help on how?
I want to make use of ArticleBuilder(), so how do i make reference to view where i have this --> <com.bluejamesbond.text.DocumentView xmlns:document="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="+id/instruction" />
a = new ArticleBuilder();
a.append("WHO: Ebola Cases",
false, new RelativeSizeSpan(2f), new StyleSpan(Typeface.BOLD))
.append("<font color=0xFFC801>Sam Frizell</font><font color=0x888888> @Sam_Frizell Oct. 25, 2014</font>",
false, new RelativeSizeSpan(0.8f), new StyleSpan(Typeface.BOLD))
.append("In New York and New Jersey, governors Andrew Cuomo and Chris Christie have implemented controversial quarantines on all healthcare workers returning from West Africa after a doctor returning from Guinea contracted the disease and was diagnosed in New York.",
true, new RelativeSizeSpan(1f), new JustifiedSpan());
DocumentView documentView = new DocumentView(getActivity(), R.id.instruction); // Support spanned text
documentView.setText(a); // Set to `true` to enable justification
Process: com.samsoft.cbc.studio, PID: 2834
java.lang.NullPointerException
at com.bluejamesbond.text.DocumentView$MeasureTask.onPostExecute(DocumentView.java:729)
at com.bluejamesbond.text.DocumentView$MeasureTask.onPostExecute(DocumentView.java:685)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Any Solution on how to relate the view and the java code together, if i'm not doing it right.. please let me know. Thanks