I have done it myself.Splitting a name by space and then checking the index of the typed string..
String[] word1=friends[i].split(" ");
for(int a=0;a<word1.length;a++)
{
index=word1[a].toLowerCase().indexOf(filterText.getText().toString().toLowerCase());
if(index == 0)
{
list.add(get(friends[i],birthdate[i]));
break;
}