반응형
상하 좌우 1dp만큼의 width로 외각선 그리기
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:bottom="0dp"
android:left="0dp"
android:right="0dp"
android:top="0dp"
>
<shape android:shape="rectangle"
>
<stroke android:width="1dp"
android:color="#000"/>
</shape>
</item>
</layer-list>
위 아래만 보더를 줄 경우는 원하지 않는 위치에 -1dp 씩 주면된다.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:bottom="0dp"
android:left="-1dp"
android:right="-1dp"
android:top="0dp"
>
<shape android:shape="rectangle"
>
<stroke android:width="1dp"
android:color="#000"/>
</shape>
</item>
</layer-list>
만약 보더에 관련된 내용을 조절하려면 stroke 의 값들을 조절하면된다.
반응형
'프로그래밍 > Android' 카테고리의 다른 글
[Android] 경기지역화폐 지도 만들기 - 5 (0) | 2020.10.05 |
---|---|
[Android] EditView에서 IP Address 입력 정규화 처리 (0) | 2020.09.17 |
[Android] RecyclerView 사용하기 (0) | 2020.09.17 |
[Android] Title bar 또는 Action Bar 없애기 (0) | 2020.09.16 |
[Android] Wifi로 Android Device 연결하여 개발하기 (0) | 2020.09.16 |