New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StringIndexOutBounds when text is less than trim length #10
Comments
Same issue. 👍 Tring to use this textview inside recyclerview. @bravoborja any help or suggestions? |
i have same problem |
I have same problem,When I use the ReadMoreTextView in RecyclerView,My App will crash,so I abandon it in my App |
any body have resolve it ? |
Is there any progress on this issue? |
i have same problem if any have solution? |
@sandeshlasnapure can you show me your for "readmore"? |
using handler may be solve the problem |
this is a big problem |
When I use the ReadMoreTextView in RecyclerView,My App will crash |
If you try to trim by length, and the length of the text is smaller than the limit, you get
java.lang.StringIndexOutOfBoundsException: length=8; regionStart=0; regionLength=101
at java.lang.String.startEndAndLength(String.java:298)
at java.lang.String.getChars(String.java:598)
at android.text.TextUtils.getChars(TextUtils.java:81)
at android.text.SpannableStringBuilder.(SpannableStringBuilder.java:65)
at com.borjabravo.readmoretextview.ReadMoreTextView.updateCollapsedText(ReadMoreTextView.java:137)
at com.borjabravo.readmoretextview.ReadMoreTextView.getTrimmedText(ReadMoreTextView.java:115)
at com.borjabravo.readmoretextview.ReadMoreTextView.getDisplayableText(ReadMoreTextView.java:92)
at com.borjabravo.readmoretextview.ReadMoreTextView.setText(ReadMoreTextView.java:86)
The text was updated successfully, but these errors were encountered: