반쪽짜리 원 모양이 필요할때가 있다.
drawable 에 xml 파일을 생성하고 아래를 참고해서 작성한다.
width, height 반원의 방향에 따라 적절히 크기를 조절
<corners> 태그에서
topLeftRadius 왼쪽 상단 둥글게
topRightRadius 오른쪽 상단 둥글게
bottomLeftRadius 왼쪽 하단 둥글게
bottomRightRadius 오른쪽 하단 둥글게
수정하면서 모양을 보면 쉽게 할 수 있다.
<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="@color/red"/>
    <size
        android:width="5dp"
        android:height="10dp"/>
    <corners
        android:bottomRightRadius="20dp"
        android:topRightRadius="20dp"/>
</shape>
'개발 > Android' 카테고리의 다른 글
| flutter test 실행시 widget_test get Error: Not found: 'dart:ui' (0) | 2021.01.14 | 
|---|---|
| Android Studio Firebase Crashlytics 설정 (0) | 2020.05.13 | 
| Android Animation scale (0) | 2020.05.08 | 
| Android Animation translate (0) | 2020.05.08 | 
| google service 빌드 오류 (0) | 2020.05.04 | 

