본문 바로가기

IT/Android96

Kotlin] Datepicker 날짜 계산 (연, 월+1, 일) Datepicker에서 날짜 선택했을 때 연, 월, 일의 값을 가져올 수 있다. 이때 연, 일의 값은 그대로 오지만 월 값은 0부터 시작하기 때문에 +1을 해줘야 한다. Calendar | Android 개발자 | Android Developers Calendar public abstract class Calendar extends Object implements Serializable, Cloneable, Comparable java.lang.Object ↳ java.util.Calendar Known direct subclasses GregorianCalendar GregorianCalendar is a concrete subclass of Calendar and provides the s devel.. 2020. 3. 8.
Kotlin] 외부저장소 저장 & 가져오기 //저장버튼 누르면 saveButton.setOnClickListener { val text = textField.text.toString() when{ TextUtils.isEmpty(text) -> Toast.makeText(applicationContext, "텍스트 볏다", Toast.LENGTH_LONG).show() !isExternalStorageWritable() -> Toast.makeText(applicationContext,"외부 저장장치 없음", Toast.LENGTH_LONG).show() else -> { // 내부저장소에 저장 //saveToInnerStorage(text, filename) //외부저장소에 저장 saveToExternalStorage(text,filename).. 2020. 3. 5.
Kotlin] 내부저장소 저장 & 가져오기 https://www.javatpoint.com/kotlin-android-read-and-write-internal-storage Kotlin Android Read and Write Internal Storage - javatpoint Kotlin Android Read and Write Internal Storage with introduction, architecture, class, object, inheritance, interface, generics, delegation, functions, mixing java and kotlin, java vs kotlin etc. www.javatpoint.com //저장버튼 누르면 saveButton.setOnClickListener { val te.. 2020. 3. 5.
Kotlin] 명시적, 암시적 Intent https://developer.android.com/reference/kotlin/android/content/Intent Intent | Android 개발자 | Android Developers developer.android.com Intent는 앱 구성 요소 간의 작업을 요청할 수 있는 메시지 객체 TestActivity.kt package com.example.lotto import android.content.Intent import android.net.Uri import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.view.View import kotlinx.android.synthetic.. 2020. 3. 2.