-1
我使用下面的代碼來獲取selectediem文本,我喜歡根據所選內容顯示某些內容,但它不符合任何線索。Android微調選定項目與文本不匹配
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}
ha ...後通知,即時通訊非常新的Java。 :) 謝謝。無論如何 – tsohtan 2013-03-01 07:06:47