如何更改此标准微调框的颜色?:
因为白色上的白色不酷:((Thx。

最佳答案

更改微调框颜色可能很有用:

mdt_spn=(Spinner)findViewById(R.id.xmdtm_spn);
ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(
        getApplicationContext(),android.R.layout.simple_spinner_item,mdt_arr) {

    public View getView(int position, View convertView,
            ViewGroup parent) {
        View v = super.getView(position, convertView, parent);

        ((TextView) v).setTextSize(30);
        ((TextView) v).setTextColor(getResources().getColorStateList(R.color.mycolor1));
        return v;
    }

    public View getDropDownView(int position, View convertView,
            ViewGroup parent) {
        View v = super.getDropDownView(position, convertView,
                parent);

        ((TextView) v).setTextSize(35);
        ((TextView) v).setTextColor(getResources().getColorStateList(
                R.color.mycolor));


        return v;
    }
};

mdt_spn.setAdapter(adapter1);

关于android - 设置微调框的背景颜色(共享微调框),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17553865/

10-10 03:18