在微调器中,目前值会自动加载,但现在我们需要微调器默认为空,然后当用户单击微调器时必须加载值。
public void requestSucceed(Response response) {
// TODO Auto-generated method stub
Log.i("Response Code ", response.getResponseCode() + "");
if (response.getResponseCode() == 0) {
List<String> list = new ArrayList<String>();
list.add("Select Product");
deliveryBoys = response.getDeliveryBoy();
Log.v("Size is ", "" + deliveryBoys.length);
for (int i = 0; i < deliveryBoys.length; i++) {
list.add(deliveryBoys[i].getDistId());
}
Log.v("Size is ", "" + list.size());
ArrayAdapter adapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_item, deliveryBoys);
deliveryPerson.setAdapter(adapter);enter code here