<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#0000FF"/>
<stroke android:width="4dp" android:color="#FFFFFF" android:dashWidth="1dp"
android:dashGap="2dp"/>
<padding android:left="7dp" android:top="7dp" android:right="7dp" android:bottom="7dp"/>
<corners android:radius="4dp"/>
</shape>
원형
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#0000FF"/>
<stroke android:width="4dp" android:color="#FFFFFF" android:dashWidth="1dp"
android:dashGap="2dp"/>
<padding android:left="7dp" android:top="7dp" android:right="7dp" android:bottom="7dp"/>
<corners android:radius="4dp"/>
</shape>
라인
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke android:width="4dp" android:color="#FFFFFF" android:dashWidth="1dp"
android:dashGap="2dp"/>
</shape>
solid 대신 gradient를 사용하여 다양한 컬러 표현 가능
<gradient android:startColor="#000000" android:endColor="#FFFFFF" android:angle="270"/>
solid는 단색 채우기
stroke는 테두리 그리기
corners는 가장자리 둥글게 처리
padding은 패딩 처리
gradient는 그라데이션 처리(angle 270은 위에서 아래로 색 변경)
댓글 없음:
댓글 쓰기