草庐IT

spinnerDrawable

全部标签

android - 在android中更改微调器上小三角形的颜色

如何更改微调器右下角小三角形的颜色,如图所示?它现在显示默认的灰色。像这样 最佳答案 最好和最简单的解决方案:spinner.getBackground().setColorFilter(getResources().getColor(R.color.red),PorterDuff.Mode.SRC_ATOP);如果您不想更改所有Spinner,其他解决方案(感谢Simon):DrawablespinnerDrawable=spinner.getBackground().getConstantState().newDrawable(

android - 在android中更改微调器上小三角形的颜色

如何更改微调器右下角小三角形的颜色,如图所示?它现在显示默认的灰色。像这样 最佳答案 最好和最简单的解决方案:spinner.getBackground().setColorFilter(getResources().getColor(R.color.red),PorterDuff.Mode.SRC_ATOP);如果您不想更改所有Spinner,其他解决方案(感谢Simon):DrawablespinnerDrawable=spinner.getBackground().getConstantState().newDrawable(