Diacritics/international characters in AutoCompleteTextView

前端 未结 8 1897
耶瑟儿~
耶瑟儿~ 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:12

    for people from poland ;):

            original = original.replace("Ą", "A");
            original = original.replace("Ć", "C");
            original = original.replace("Ę", "E");
            original = original.replace("Ł", "L");
            original = original.replace("Ń", "N");
            original = original.replace("Ó", "O");
            original = original.replace("Ś ", "S");
            original = original.replace("Ź", "Z");
            original = original.replace("Ż", "Z");
    
            original = original.replace("ą", "a");
            original = original.replace("ć", "c");
            original = original.replace("ę", "e");
            original = original.replace("ł", "l");
            original = original.replace("ń", "n");
            original = original.replace("ó", "o");
            original = original.replace("ś", "s");
            original = original.replace("ź", "z");
            original = original.replace("ż", "z");
            original = original.replace("ž", "z");
    

提交回复
热议问题