반응형
// 배경은 toast_background
val toast = Toast.makeText(applicationContext, R.string.all_done_message, Toast.LENGTH_LONG)
val view = toast.view
view.setBackgroundResource(R.drawable.toast_background)
// 글자 크기 36f, 글자색 white
val group = toast.view as ViewGroup
val msgTextView = group.getChildAt(0) as TextView
msgTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 36f)
msgTextView.setTextColor(resources.getColor(R.color.colorWhite))
반응형
'IT > Android' 카테고리의 다른 글
Kotlin] MultiSelectListPreference 선택값 summary에 반영 (0) | 2020.04.04 |
---|---|
Kotlin] ListPreference 선택값 summary에 반영 (0) | 2020.04.04 |
Kotlin] 안드로이드 알람 설정 & 해제 (0) | 2020.03.29 |
Kotlin] 안드로이드 당겨서 새로고침 // SwipeRefreshLayout (0) | 2020.03.20 |
Kotlin] 안드로이드 리스트뷰 삭제 (다중선택) (0) | 2020.03.18 |
댓글