레이아웃의 모서리를 둥글게하려면 어떻게 해야하나요?

조회수 19274회

레이아웃의 모서리를 둥글게하는 법을 찾고있는데요. 어떻게하면 좋을지 제 머리로는 도저히 모르겠습니다.

1 답변

  • 좋아요

    0

    싫어요
    채택 취소하기

    drawable폴더에서 xml을 만들어줍니다.

    <?xml version="1.0" encoding="UTF-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android">
        <solid android:color="#FFFFFF"/>
        <stroke android:width="3dip" android:color="#B1BCBE" />
        <corners android:radius="10dip"/>
        <padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
    </shape>
    

    rounded.xml

    둥글게하고싶은 레이아웃에 속성을 적용시킵니다.

    android:background="@drawable/rounded"
    

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)