Search code examples
javaandroidkotlinandroid-custom-viewanko

how to make a part of textview editable


First I'm using Anko library, Kotlin, Java in my project. I have an android app that test skills in French so I want to make a part of Textview editable its something like this (Solo Learn): https://i.sstatic.net/bfric.png I try :

je mang$ une pomme

then split String with $ and add editText in place of $ but it's not a good idea using web view also it's not a good idea even its work thanks in advance.


Solution

  • You can add addTextChangedListener to EditText view and add prefix or suffix, you need to be non-editable.

    Check this previous question also ->

    Put constant text inside EditText which should be non-editable - Android