如何设计具有自定义颜色和底部边框等的微调器?

How to design the spinner with custom color and bottom border etc?

我想在 android 中自定义微调器。当我为微调器添加 xml 源时,它看起来像这样:

没有边框,只有向下箭头。

但我想像这样自定义它:

请不要给我做这个。我只想自学,想知道设计和定制微调器的各种方法是什么。我需要了解所有方法,例如使用微调器的 xml 属性,或单独的 xml 样式文件,或 xml 形状文件或 java 等。进一步,在知道了我自己设计的方式之后。每种方式的一个小例子将不胜感激。提前致谢!!!

尝试向微调器添加样式

<Spinner
        android:id="@+id/spinner"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@android:style/Widget.Material.Spinner.Underlined"
/>