the code below makes the application crash on a meizu phone, but not on my galaxy s2. (meizu version is newer but it's not mine, and not here so I don't know what is the version)
public void onClick(View v){
et= (EditText) findViewById(R.id.searchEdit);
int newArrIndex= 0;
Log.d("BeforeFirst","BeforeFirst");
String [] newArr=new String [contactsArray.length];
for (int i=0;i<contactsArray.length;i++){
if(et.getText().toString().contains("blibli")){
newArr[0]="bla";
newArr[1]="blo";
break;
}
else if(et.getText().toString().contains("blabla")){
newArr[0]="bli";
newArr[1]="blu";
break;
}
if(contactsArray[i].contains(et.getText().toString())){
newArr[newArrIndex]=contactsArray[i];
newArrIndex++;
}
et.setSelected(false);
}
Bundle bundle=new Bundle();
bundle.putStringArray("contacts",newArr);
MyPlaceholderFragment frag=new MyPlaceholderFragment();
frag.setArguments(bundle);
getSupportFragmentManager().beginTransaction()
.add(R.id.container, frag)
.commit();
setContentView(R.layout.activity_search);
}
when I click enter the my galaxy s2 keyboard, I get what I want. when I do the same on the meizu mx4, it crashes after I press enter. So what could be the problem here? It must be some android class that is not compatible with both phones (and not my stupid program - cause it works)
the phone is not mine, and not with me, so I don't have error log. Any idea? direction? Thanks a lot.