标签: bullet-span

How to apply Bullet and Numbered List in android Edit-text

I am trying to apply Bulleted list and Numbering list in android edit-text when user press button. For that i have tried below code.

For Bullet

BulletSpan[] quoteSpan = str.getSpans(selectionStart, selectionEnd, BulletSpan.class);

                // If the selected text-part already has UNDERLINE style on it, then we need to disable it
                for (int i = 0; i < quoteSpan.length; i++) {
                    str.removeSpan(quoteSpan[i]);
                    exists = true;
                }

                // Else we set UNDERLINE style on it
                if (!exists) {
                    str.setSpan(new BulletSpan(10), selectionStart, selectionEnd, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); …
Run Code Online (Sandbox Code Playgroud)

android richeditabletext spannable bullet-span

6
推荐指数
0
解决办法
1664
查看次数