[XML] 코드로 이미지 파일 만들기
2021. 5. 26. 21:34
그라데이션 이미지 만들기
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#E91E63"
android:centerColor="#9C27B0"
android:endColor="#673AB7"
android:angle="90"/>
</shape>
테두리 이미지 만들기
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:color="#2196F3"
android:width="30dp" />
</shape>
모서리가 둥근 이미지 만들기
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid
android:color="#3F51B5"/>
<corners
android:bottomLeftRadius="30dp"
android:bottomRightRadius="10dp"
android:topLeftRadius="100dp"
android:topRightRadius="80dp"/>
</shape>
728x90
'💻개발 > Android' 카테고리의 다른 글
뷰바인딩 (viewbinding) (0) | 2021.05.27 |
---|---|
activity 수명 주기 (0) | 2021.05.26 |
[XML] Scrollview, Imageview (0) | 2021.05.26 |
[XML] Layout : Linearlayout, Relativelayout, Framelayout (0) | 2021.05.26 |
[오류해결] xml파일에서 선언한 id를 kotlin파일에서 사용하기 (0) | 2021.01.16 |