• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How do I create multi-color input editor text?

bin_per

Lurker
As shown in the picture below, you want to create EditText, which allows users to enter text by color.
Currently, we make two EditText and TextViews that are inputted and printed.
EditText with textWatcher listener, so you can start with TextView.
Computes the currently selected color and character location to change and display the SpanableStringBuilder.

Here's the question:
1. How do I not print the text entered in EditText?
(EditText does not want to display on the screen after receiving input only.)
2. Is there a better way to create EditText for multiple colors?

upload_2020-11-9_9-53-26.png
 

Attachments

  • upload_2020-11-9_9-53-21.png
    upload_2020-11-9_9-53-21.png
    62.3 KB · Views: 255
  • upload_2020-11-9_9-53-24.png
    upload_2020-11-9_9-53-24.png
    62.3 KB · Views: 253
Back
Top Bottom