본문 바로가기
IT/Android

Xml] 안드로이드 버튼 테두리 설정

by 깻잎쌈 2020. 4. 27.
반응형

사각형 두개를 겹치는 방식으로 해결 

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape
            android:shape="rectangle">
            <stroke android:width="20dp" android:color="@color/colorBlue" />
            <solid android:color="#FFDDDDDD" />

        </shape>
    </item>

    <item  android:left="15dp" android:right="15dp">
        <shape
            android:shape="rectangle">
            <stroke android:width="5dp" android:color="@color/colorWhite" />
            <solid android:color="#FFFFFF" />
        </shape>
    </item>
</layer-list>

https://stackoverflow.com/questions/23216305/add-only-top-and-bottom-border-on-linearlayout

 

Add only top and bottom border on LinearLayout

I would like to add only a bottom and a top border on my Linearlayout. I have tried to do this : stackoverflow.com

 

반응형

댓글