Android
Shape Drawable 동적으로 색 변경하기
parkho79
2020. 1. 20. 16:11
728x90
지난 Shape Drawable 포스팅에 이어 이번 포스팅에서는 Shape Drawable 의 색을 동적으로 변경해보자
How to
◼ Shape xml 생성
◼ 하단과 같이 ImageView 의 background 를 Shape 로 지정
◼ Shape color 를 변경하기 위해 하단과 같이 GradientDrawable 을 이용한다.
Source code
https://github.com/parkho79/ShapeDrawableDynamicColor
728x90