我无法将选定的微调器项目设置为edittext视图。只有第一个微调器项附加到edittext。如果我选择剩余值,则它们不会附加到edittext。请帮我?我的代码如下。
NodeList list = ScheduleScreenExpendableActivity.list;
List<String> lables = new ArrayList<String>();
for (int i = 0; i < list.getLength(); i++) {
// Adding child data
lables.add("" + list.item(i).getTextContent());
}
// Creating adapter for spinner
ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, lables);
// Drop down layout style - list view with radio button
dataAdapter
.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
// attaching data adapter to spinner
client_sp.setAdapter(dataAdapter);
// loadSpinnerData();
String selecteditem=client_sp.getSelectedItem().toString().trim();
cname.setText(selecteditem);