开发者

Filtering Array of Strings

开发者 https://www.devze.com 2023-01-21 02:31 出处:网络
Friend\'s I\'m working upon searching in maps, here i have string in my array,when i enter characters for searching in Edit text box,i need the string have started with similar character in my resul开

Friend's I'm working upon searching in maps, here i have string in my array,when i enter characters for searching in Edit text box,i need the string have started with similar character in my resul开发者_C百科t.

for example in my array i have String[] name ={"A","B","BB","Boys","Box"}

Initially i have all the array string in my result,if i suppose enter an character like b in editbox i need filter and show the charcters matches with b that is "B","BB",""Boys","Box",if suppose i enter two characters like "bo"in editbox ,i need result strings "Boys","Box"in another array. Help me.

thanks in advance.


Consider using AutoCompleteTextView instead of simple EditText.

0

精彩评论

暂无评论...
验证码 换一张
取 消