Answer the question
In order to leave comments, you need to log in
How to make a Bordless button with a given background color?
I need a button without padding with a given background color and a working "default" ripple effect:
I tried to do this:
<Button
style="@style/Button.Default"
android:id="@+id/next"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/continue_text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"/>
<style name="Button.Default" parent="Widget.AppCompat.Button.Borderless.Colored">
<item name="colorButtonNormal">@color/accent</item>
<item name="android:textColor">@android:color/white</item>
</style>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question