-
val intent = Intent(Intent.ACTION_DIAL, Uri.parse("tel:01012345678")) startActivity(intent) 전화를 직접 거는게 아니라서 퍼미션은 필요없음
val layoutParams = binding.iv.layoutParams layoutParams.width = pixelValue layoutParams.height = pixelValue binding.iv.layoutParams = layoutParams
java.lang.NullPointerException: null cannot be cast to non-null type android.view.ViewGroup binding.xxxx as ViewGroup -> binding.xxxx as ViewGroup? nullable하게 변경해준다.
viewPager2.setUserInputEnabled(false);
스크롤이 중복되거나 다른 문제가 있어 안쪽 RecyclerView의 스크롤을 막을 때 안쪽 RecyclerView에서 setNestedScrollingEnabled(false);
드릴게요 O 드릴께요 X - ‘드릴게요’로 쓰고, [드릴께요]로 읽을 수 있습니다. 국어의 어미에 ‘-(으)ㄹ게’는 있지만, ‘-(으)ㄹ께’는 없기 때문에 ‘드릴께요’로 쓸 수 없습니다. by 국립국어원
fun getDecimalFormat(number: String): String { val deciamlFormat = DecimalFormat("#,###") return deciamlFormat.format(number) }
기존에는 Html.fromHtml(getString(R.string.html_content)) 이런식으로 사용했다면 코틀린에서는 문자열 뒤에 .parseAsHtml() 이것만 붙이면 더 쉽게 사용이 가능하다. getString(R.string.html_content).parseAsHtml() * gradle에서 아래 ktx 추가해줘야함 implementation 'androidx.core:core-ktx:1.6.0'