Issue
I am making a rounded and bordered button. But I am getting button with only primary color in the theme. Here is my code in circular button drawable file:-
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/green" />
<corners android:radius="50dp" />
<stroke
android:width="10dp"
android:color="@color/red_primary" />
</shape>
here is my button code:-
<Button
android:id="@+id/feedback_btn"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="5dp"
android:layout_weight="1"
android:padding="10dp"
android:background="@drawable/circular_button"
android:text="@string/send_feedback"
android:textColor="@color/white" />
Solution
also add app:backgroundTint="@null" in Button tag.
Answered By - Vishal Vasani
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.