我指的是这个问题Spinner options (an IcsSpinner from ABS) inside DialogFragment are displayed truncated
我们面对这种解决方案的下一个问题是旋转器使用姜饼触摸反馈与丑陋的橙色
我们如何在微调器中设置触摸反馈的颜色?或者至少,如何使用默认的全息颜色?
我正在使用自定义适配器进行微调器,
public class CategoriesAdapter extends ArrayAdapter<CategorieItem> {
private static final String tag = "CategoriesAdapter";
private ArrayList<CategorieItem> list;
private Context c;
private LayoutInflater inflater;
public CategoriesAdapter(Context context, int resource, ArrayList<CategorieItem> list) {
super(context, resource, list);
c = context;
this.list = list;
Clog.d(tag, "Constructor " + list.toString());
inflater = (LayoutInflater) c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
Clog.d(tag, "convertView is null");
v = inflater.inflate(R.layout.hiscat_item, parent, false);
}
TextView catText = (TextView) v.findViewById(R.id.his_category);
Clog.d(tag, "Cat Text : " + list.get(position).getName());
catText.setText(list.get(position).getName());
catText.setTextColor(list.get(position).getColor());
return v;
}
@Override
public View getDropDownView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
Clog.d(tag, "convertView is null");
v = inflater.inflate(R.layout.hiscat_dropdown, parent, false);
}
TextView catText = (TextView) v.findViewById(R.id.his_category);
Clog.d(tag, "Cat Text : " + list.get(position).getName());
catText.setText(list.get(position).getName());
catText.setTextColor(list.get(position).getColor());
return v;
}
}