Kotlin33 Kotlin] 안드로이드 Fragment findViewById Null [안드로이드] Fragment에서 findViewById 에러 해결 방법 Fragment에서 findViewById error Fragment에서 바인딩을 위해 findViewById() 함수를 사용한다면 다음과 같은 오류가 발생합니다. java.lang.NullPointerException: Attempt to invoke virtual method 'android.v.. swalloow.tistory.com override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { val view = inflater.inflate(R.layout.fragment, cont.. 2021. 5. 22. Kotlin] 안드로이드 국가별 시간, 날짜 표시 // getBestDateTimePattern Format DateTime in Android - AndroidWave In this tutorials, We explain How to Format DateTime in Android using SimpleDateFormat. Example Include - Format Date to Text and Parse Text to Date androidwave.com Codota Codota search - find any Java class or method www.codota.com val skeleton: String = DateFormat.getBestDateTimePattern(Locale.getDefault(), "MMMM d") val formatter = SimpleDateFormat(ske.. 2021. 5. 20. Kotlin] 안드로이드 채팅방 날짜 표시 How do I display the calendar date on the top of chat messages? I am working on a chat application but I am struggling to figure out how to display the calendar date on the top of chat messages; for example, something like this: Another image with timestamps: ... stackoverflow.com 각 채팅 메세지에 대한 Adapter에 해당 코드를 넣어준다. override fun onBindViewHolder(holder: ViewHolder, position: Int) { holder.bind(ch.. 2021. 5. 1. Kotlin] 안드로이드 버튼 눌린 상태로 유지 버튼 한번 클릭했을 때 눌린 상태로 유지되도록 합니다. 눌렸을 때랑 안 눌렸을 때를 구분하도록 selector를 만듭니다 이때 state_pressed가 아니라 state_selected를 사용한다 그리고 버튼 클릭시 selected 여부를 바꿔줍니다. button?.setOnClickListener { button?.isSelected = button?.isSelected != true } 안드로이드 - 안드로이드 이미지뷰 버튼 누른상태 유지 - 안드로이드 Q&A 안녕하세요 이미지뷰 버튼 누른 상태를 유지하려고 하는데 selector를 만들어서 focused, selected 등 설정은 하였습니다. 그러나 누를때 잠시 깜빡 하고 사라집니다.. 이렇게 말고 누르면 누른상태를 www.masterqna.com 2021. 3. 23. 이전 1 ··· 3 4 5 6 7 8 9 다음