Search code examples
javaandroid-studiotextviewandroid-edittext

How to only let Edit Text accept Letters which are in Textview


I have an edit text however I only want letters which are in another Text view to be typeable. For example if the Text view say Hello Only H,E,L and O should be Typeable.


Solution

  • Using this code you can get it to only accept your String

    android:digits="@string/YourString"