반응형

전체 글 147

day19, day20

1. room 만들다 생긴 오류 수정 android AppDatabase_Impl does not exist 라는 에러가 발생. KAPT란. Kotlin에서 Annotation처리를 위해서 KAPT(Kotlin Annotation Processing Tool)을 제공 Project 내부에서 Hilt, Room, Databinding 같은 library가 사용된다면 필요 Kotlin은 kotlinc로 컴파일되기 때문에 기존에 Java로 작성된 Annotation Process로는 Kotlin의 Annotation이 제대로 처리되지 않음. https://kotlinlang.org/ 의 Kotlin Gradle plugins { kotlin("kapt") version "1.6.10" } ... depende..

til 2022.01.06

day11

1. 리사이클러 뷰 하다 실패함. RecyclerView 주요 클래스 RecyclerView : 데이터에 해당하는 뷰가 포함된 ViewGroup입니다. View Holder : 목록의 각 개별 요소는 뷰 홀더 객체로 정의됩니다. 뷰 홀더가 생성되었을 때는 뷰 홀더에 연결된 데이터가 없습니다. 뷰 홀더가 생성된 후 RecyclerView가 뷰 홀더를 뷰의 데이터에 바인딩합니다. RecyclerView.ViewHolder를 확장하여 뷰 홀더를 정의할 수 있습니다. LayoutManager : 목록의 개별 요소를 정렬합니다. LinearLayoutManager - 가로 / 세로 GridLayoutManager - 그리드 형식 StaggeredGridLayoutManager - 지그재그형의 그리드 형식 Adap..

til 2021.12.29

DAY 6

Retrofit을 사용한 통신 1. 의존성 추가 implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation "com.squareup.okhttp3:logging-interceptor:4.8.1" 참고로 의존성 버전확인은 Project Structure > dependencies에서 확인할 수 있습니다. 의존성 추가 한후 sync now 해줍니다. 2. 인터넷 사용 허용 Unit){ var call = iRetrofit?.loginRequest(username, password) ?:return call.enqueue(object: ..

til 2021.12.24

DAY 5

코틀린 데이터 클래스 data class Person(var name: String, var age: Int, var gender: String) 1. getter, setter 2. Canonical Methods : equlas(), hashCode(), toString() 3. copy() 4. 디스트럭쳐링 val james: Person = Person(Jane", 30, "female") val (name, age, gender) = james 데이터 바인딩 1. app/build.gradle 에 dataBinding 요소를 추가 android { ... buildFeatures { dataBinding true } } 2. data binding 을 사용하는 xml 리소스는 루트 태그로 시작하..

til 2021.12.23