在您自定義的微調適配器,你應該有:
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = getLayoutInflater();
View row = inflater.inflate(yourSelectedItemLayout, parent,false);
TextView make = (TextView) row.findViewById(R.id.Make);
v.setText(data.get(position));
return row;
}
public View getDropDownView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = getLayoutInflater();
View row = inflater.inflate(yourDropDownlayoutOut, parent,false);
TextView make = (TextView) row.findViewById(R.id.Make);
v.setText(data.get(position));
return row;
}
yourSelectedItemLayout和yourDropDownlayoutOut將佈局創建,你可以設置自己的格式。