android中对获取的字符创判断为空时:使用TextUtils.isEmpty()
public void clickHandler(View view)
{
EditText et = (EditText)findViewById(R.id.input);
String st = et.getText().toString();
if(!TextUtils.isEmpty(st))
{
count++;
Intent it = new Intent(this,Other.class);
it.putExtra("enter", st);
it.putExtra("mystring", "妈蛋!");
Log.i(TAG,"press !"+ count);
startActivity(it);
}
}