I have a buttons and I want to make them look like a spinner. I've found this post from 2011: Android: Drawing a button as a spinner
And none of the solutions worked for me.
It's better if I could use my customed background. Those are the buttons:
<Button
android:id="@+id/new_msn_act_type"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:background="@drawable/button_border"
android:onClick="showPopup"
android:padding="6dp"
android:text="Order Type"
android:textColor="@color/colorPrimary" />
<Button
android:id="@+id/new_msn_datetimepick"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:background="@drawable/button_border"
android:onClick="pickDateTime"
android:padding="6dp"
android:text="Date and Time"
android:textColor="@color/colorPrimary" />
I tried each one of the solutions suggested in the post, including
style="?android:attr/spinnerStyle"
And they didn't work. How can I solve it ? Thanks
I need it to be a Button, because I want to use drawable style as background, and I want it to open PopupMenu and I worked hard for the popup to present icons correctly...