我使用下面的代码来获取 selectediem 文本,我喜欢根据选择的内容显示一些内容,但奇怪的是它不匹配,有什么线索吗?
Spinner mlogin_store;
mlogin_store = (Spinner) findViewById(R.id.spinlogin_store);
String Text = mlogin_store.getSelectedItem().toString().trim();
Log.d("click",Text); //I can see the "Abc" in LogCat. but it doesn't match the string below.
if (Text=="Abc"){ //first block
//Do something
}else{
//do something else}