title: TextEx Android Justify Library :java.lang.StringIndexOutOfBoundsException
body: <p>I am using <a href="https://github.com/bluejamesbond/TextJustify-Android" rel="nofollow">this library</a> in my android application. I use the class <strong>TextViewEx</strong> like that</p>
  
  <pre><code>data_area = (TextViewEx ) view.findViewById(R.id.data_area);
  Log.e("Position", position + " in fragment");
  
  data_area.setText(MainActivity.islamicContentList.get(position).desc,true);
  </code></pre>
  
  <p>Then I got crashed. </p>
  
  <pre><code>java.lang.StringIndexOutOfBoundsException: length=40; index=41 at java.lang.String.indexAndLength(String.java:589) at java.lang.String.substring(String.java:1448) at com.applogic.hajjguidebangla.TextViewEx.onDraw(TextViewEx.java:228) at android.view.View.draw(View.java:13614) at android.view.View.getDisplayList(View.java:12565) at android.view.View.getDisplayList(View.java:12609) at android.view.View.draw(View.java:13338) at android.view.ViewGroup.drawChild(ViewGroup.java:2990) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2860) at android.view.View.getDisplayList(View.java:12563) at android.view.View.getDisplayList(View.java:12609) at android.view.View.draw(View.java:13338) at android.view.ViewGroup.drawChild(ViewGroup.java:2990) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2860) at android.view.View.draw(View.java:13617) at android.widget.FrameLayout.draw(FrameLayout.java:467) at android.widget.ScrollView.draw(ScrollView.java:1825) at android.view.View.getDisplayList(View.java:12565) at android.view.View.getDisplayList(View.java:12609) at android.view.View.draw(View.java:13338) at android.view.ViewGroup.drawChild(ViewGroup.java:2990) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2860) at android.view.View.getDisplayList(View.java:12563) at android.view.View.getDisplayList(View.java:12609) at android.view.View.draw(View.java:13338) at android.view.ViewGroup.drawChild(ViewGroup.java:2990) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2860) at android.view.View.getDisplayList(View.java:12563) at android.view.View.getDisplayList(View.java:12609) at android.view.View.draw(View.java:13338) at android.view.ViewGroup.drawChild(ViewGroup.java:2990) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2860) at android.view.View.draw(View.java:13617) at android.support.v4.view.ViewPager.draw(ViewPager.java:2092) at android.view.View.getDisplayList(View.java:12565) at android.view.View.getDisplayList(View.java:12609) at android.view.View.draw(View.java:13338) at android.view.ViewGroup.drawChild(ViewGroup.java:2990) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2860) at android.view.View.draw(View.java:13617) at android.view.View.getDisplayList(View.java:12565) at android.view.View.getDisplayList(View.java:12609) at android.view.View.draw(View.java:13338) at android.view.ViewGroup.drawChild(ViewGroup.java:2990) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2860) at android.view.View.getDisplayList(View.java:12563) at android.view.View.getDisplayList(View.java:12609) at android.view.View.draw(View.java:13338) at android.view.ViewGroup.drawChild(ViewGroup.java:2990) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2860) at android.view.View.getDisplayList(View.java:12563) at android.view.View.getDisplayList(View.java:12609) at android.view.View.draw(View.java:13338) at android.view.ViewGroup.drawChild(ViewGroup.java:2990) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2860) at android.view.View.draw(View.java:13617) at android.widget.FrameLayout.draw(FrameLayout.java:467) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2458) at android.view.View.getDisplayList(View.java:12565) at android.view.View.getDisplayList(View.java:12609) at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1187) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2313) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2185) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1993) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1143) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4674) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725) at android.view.Choreographer.doCallbacks(Choreographer.java:555) at android.view.Choreographer.doFrame(Choreographer.java:525) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4960) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) at dalvik.system.NativeStart.main(Native Method)
  </code></pre>