Diacritics/international characters in AutoCompleteTextView

前端 未结 8 1894
耶瑟儿~
耶瑟儿~ 2021-02-15 17:02

I have a (array) list

Car
Something
Šibica
Čavao
Cavao

Is there a way to \"force\" AutoCompleteTextView so if user type in letter \"c\"

8条回答
  •  不思量自难忘°
    2021-02-15 17:23

    When you're comparing your strings to the users input, you might want to use a Collator...

    http://download.oracle.com/javase/1.5.0/docs/api/java/text/Collator.html

    ...call getInstance(), set an appropriate strength, and use the compare or equals methods to find what matches the user input.

提交回复
热议问题