Hai Friends, I have created an Edit text,in which the user type something , ForInstance: if the user types "tl" then i have to fire keytyped event and a search has to be done with the existing array and list the combination of tl, which the user was typed in the edit box, i am struggling on this, pls guide me on this.
@Override
public boolean onKeyDown(View arg0, Editable arg1, int arg2, KeyEvent arg3) {
// TODO Auto-generated method stub
slist1.display(san_search);
slist1.notifyDataSetChanged();
return true;
}
public String display(String temp)
{
String kemp="";
String kemp_check;
char[] kemp_find=new char[200];
char[] bname_find=new char[200];
for(int s=0;s<bname.length;s++)
{
kemp_find= bname[s].toCharArray();
bname_find=temp.toCharArray();
if(bname_find == kemp_find)
{
kemp+=bname[s];
holder.text1.setText(kemp);
}
}
return temp;
}
}
thanks in Advance.