jaychang0917 / SimpleText

A simple spannable string helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feedback SimpleText BUG

tcqq opened this issue · comments

commented

I use “{” in allStartWith, app will error, i use "#" It works fine.

    SimpleText simpleText = SimpleText.create(this, subtitleText)
            .allStartWith("{")
            .textColor(R.color.colorGreen600);

                                                           Process: com.changrui.tt, PID: 7363
                                                           java.lang.RuntimeException: Unable to start activity ComponentInfo{com.changrui.tt/com.changrui.tt.activity.RegisteredPrivacyAndTermsActivity}: java.util.regex.PatternSyntaxException: Syntax error in regexp pattern near index 1
                                                           {\w+
                                                            ^
                                                               at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
                                                               at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
                                                               at android.app.ActivityThread.-wrap11(Unknown Source:0)
                                                               at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
                                                               at android.os.Handler.dispatchMessage(Handler.java:106)
                                                               at android.os.Looper.loop(Looper.java:164)
                                                               at android.app.ActivityThread.main(ActivityThread.java:6494)
                                                               at java.lang.reflect.Method.invoke(Native Method)
                                                               at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                                                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
                                                            Caused by: java.util.regex.PatternSyntaxException: Syntax error in regexp pattern near index 1
                                                           {\w+
                                                            ^