1
我想我的應用程序填充一個空的textview與用戶從微調選擇的值。目前它似乎工作,但它只填充了我猜測的是整個遊標的textview:([email protected])。 有人可以幫我找出問題所在嗎?如有必要,我可以發佈更多代碼。Android - 從Spinner項目填充textview
// Set spinner listener to populate the description field onclick.
mContext = this;
commonDescSpin.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id){
String stringItem = parent.getItemAtPosition(position).toString();
mDescriptionText.setText(stringItem);
}
public void onNothingSelected(AdapterView<?> parent) {}
});