Diacritics/international characters in AutoCompleteTextView

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

    For Slovak language:

        original = original.replace("Á", "A");
        original = original.replace("Ä", "A");
        original = original.replace("Č", "C");
        original = original.replace("Ď", "D");
        original = original.replace("É", "E");
        original = original.replace("Í", "I");
        original = original.replace("Ĺ", "L");
        original = original.replace("Ľ", "L");
        original = original.replace("Ň", "N");
        original = original.replace("Ó", "O");
        original = original.replace("Ô", "O");
        original = original.replace("Ŕ", "R");
        original = original.replace("Š", "S");
        original = original.replace("Ť", "T");
        original = original.replace("Ú", "U");
        original = original.replace("Ý", "Y");
        original = original.replace("Ž", "Z");
    
        original = original.replace("á", "a");
        original = original.replace("ä", "a");
        original = original.replace("č", "c");
        original = original.replace("ď", "d");
        original = original.replace("é", "e");
        original = original.replace("í", "i");
        original = original.replace("ĺ", "l");
        original = original.replace("ľ", "l");
        original = original.replace("ň", "n");
        original = original.replace("ó", "o");
        original = original.replace("ô", "o");
        original = original.replace("ŕ", "r");
        original = original.replace("š", "s");
        original = original.replace("ť", "t");
        original = original.replace("ú", "u");
        original = original.replace("ý", "y");
        original = original.replace("ž", "z");
    

提交回复
热议问题