I want that my button looks like a spinner, because I will show a special dialog if the button is clicked. I use Theme.MaterialComponents
and tried following but it's not working:
<Button
android:id="@+id/btMusclegroups"
style= "?spinnerStyle"// or style="@style/Widget.AppCompat.Spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
The button still looks solid and not like a spinner.
Desired result
I want that my button looks the same as following Spinner
:
<Spinner
android:id="@+id/btMusclegroups"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
I could use a Spinner
with OnTouchListener
and a dummy adapter (I don't need the adapter, my dialog knows all the data it needs already) but I'd prefer the above way - is this somehow achievable?