본문 바로가기
Android/커스텀 뷰

둥근 모서리를 가진 그라데이션 테두리 사각형 만들기

by 안스 인민군 2023. 3. 29.
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <gradient
                android:angle="90"
                android:centerColor="@color/learning_graph_bar_gradient_center_bg"
                android:endColor="@color/learning_graph_bar_gradient_end_bg"
                android:startColor="@color/learning_graph_bar_gradient_start_bg" />
            <corners android:radius="@dimen/study_box_radius" />
        </shape>
    </item>
    <item
        android:bottom="@dimen/study_box_border"
        android:left="@dimen/study_box_border"
        android:right="@dimen/study_box_border"
        android:top="@dimen/study_box_border">
        <shape android:shape="rectangle">
            <solid android:color="@color/theme_color_palette_gray_10" />
            <corners android:radius="@dimen/study_box_radius" />
        </shape>
    </item>
</layer-list>