IT/Android103 Kotlin] 안드로이드 앱 실행 시 전면 광고 넣기 https://stackoverflow.com/questions/24125022/want-to-show-admob-interstitial-on-app-start 2020. 4. 8. Kotlin] MultiSelectListPreference 선택값 summary에 반영 val Pref = findPreference("Category") as MultiSelectListPreference Pref.summary = Pref.values.joinToString(", ") //sumary에 반영 Pref.setOnPreferenceChangeListener { preference, newValue -> val newValueSet = newValue as? HashSet ?: return@setOnPreferenceChangeListener true Pref.summary = newValueSet.joinToString(", ") true } 2020. 4. 4. Kotlin] ListPreference 선택값 summary에 반영 val backgroundColorCategoryPref = findPreference("backgroundColorCategory") as ListPreference // 선택값 summary에 반영 backgroundColorCategoryPref.setOnPreferenceChangeListener { preference, newValue -> if (preference is ListPreference) { val index = backgroundColorCategoryPref.findIndexOfValue(newValue.toString()) backgroundColorCategoryPref.summary = backgroundColorCategoryPref.entries[index] } Log... 2020. 4. 4. Kotlin] toast 메세지 // 배경, 글자 크기, 글자색 설정하기 // 배경은 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... 2020. 3. 31. 이전 1 ··· 20 21 22 23 24 25 26 다음