Issue
I want to use custom background on android button without any border and with radius only on top of the button and I make the drawable like that but the problem I got a gray line in the bottom of the button how I can remove it I already using style="@android:style/Widget.Holo.Button.Borderless" but it didn't make anything
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/turquoise" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="14dp"
android:topRightRadius="14dp" />
<solid android:color="@color/white" />
<size android:height="60dp" />
</shape>
</item>
and here is the button used in the layout
<Button
android:id="@+id/btn_bg"
style="@android:style/Widget.Holo.Button.Borderless"
android:layout_width="match_parent"
android:layout_height="60dp"
android:clickable="false"
android:background="@drawable/custom_bg_white"
android:textSize="14sp"
android:visibility="visible" />
Solution
this gray line is not border it's the elevation that is made by the button style if you don't want it set android:elevation=0dp
and set android:stateListAnimator="@null"
Answered By - Ezaldeen sahb
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.