How to create a Widget.Holo.Spinner-style widget in v7

前端 未结 2 1947
夕颜
夕颜 2021-01-04 11:16

I have a Button that I want to style like a Holo-style spinner, i.e. underlined with a triangle in the bottom right corner - the built-in contacts app for examp

2条回答
  •  猫巷女王i
    2021-01-04 11:57

    I wouldn't recommend you to style a button like a spinner. Android have created a particular style for the button for a reason. THe reason behind this simple; you are going to confuse the users of your app if you style a button like a spinner, and they will think that the button is a spinner. That is why the Android design team do not recommend this.

    Nonetheless, if you still wish to show the button as a sninner, you can always copy the design of the spinner, save it as an image and set it as the background of yuor button through this xml:

    android:background="@drawable/spinner"
    

    The spinner drawable needs to be saved in the drawables folder as an image.

提交回复
热议问题