728x90
반응형
1. darwable - new - drawble Resource file을 새로 만들어 줍니다.
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent"/>
<corners android:radius="250dp"/>
<stroke android:color="@color/colorPrimary" android:width="5dp"> </stroke>
</shape>
색과 라운드 간격은 원하시는 것으로 해주세요.
2. layout으로 가셔서
android:background="@drawable/파일이름"
이렇게 넣어주세요.
---------------------
저는 버튼에 넣어서 만들어 보았습니다.
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="@drawable/rounded_borders"
android:backgroundTint="#989898"
android:text="Button"
android:textColor="@android:color/black"/>
그러면
이렇게 선이 나오게 됩니다.
반응형
'앱 코딩' 카테고리의 다른 글
유니티) 어느 지점을 지나면 오브젝트 생성 (0) | 2021.04.12 |
---|---|
유니티) 다양한 오브젝트 연속으로 겹치지 않게 나오게 코딩하는 법 (0) | 2021.04.09 |
유니티_ 스코어 3등까지 나타내기 (0) | 2021.04.07 |
안드로이드 스튜디오_ 애니메이션 효과 넣어주기 (0) | 2021.03.31 |
drawble에서 라운트 코너 만들기 (0) | 2021.03.29 |