Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Firebase
- 안드로이드 개발자
- android
- 코틀린
- android compose
- 반응형 프로그래밍
- 이펙티브 코틀린
- 코루틴
- 알고리즘
- 코딩테스트
- Java
- 프로그래머스
- Rxjava 안드로이드
- 안드로이드 다이얼로그
- 잡담
- 이펙티브코틀린
- RxKotiln
- 개발자
- swift map
- react
- Go언어
- MVVM
- 안드로이드
- Swift 문법
- Dev6
- RxJava
- 안드로이드 컴포즈
- Flutter
- Kotiln
- 일상
Archives
- Today
- Total
목록Drawable background color (1)
최데브는 오늘도 프로그래밍을 한다.
Drawable Shape 코드로 색상 동적 변경
Drawable Shape를 배경 등.. 으로 사용할때 색상을 동적으로 변경하는 방법 입니다. TextView의 배경을 둥글게 하기 위해서 shape로 배경을 깔아주고 배경 색상은 아래와 같이 지정 해줍니다. GradientDrawable bgShape = (GradientDrawable) textView.getBackground(); bgShape.setColor(getResources().getColor(R.color.colorPrimary)); 코틀린에서는 var bgShape : GradientDrawable = get_auth_text_bt.background as GradientDrawable bgShape.setColor(resources.getColor(black)) 이렇게 사용합니다.
Android
2021. 7. 31. 14:39