Android/Kotlin

    [Android/kotlin] ktlint 설치

    📌 Ktlint 설치 kotlin 언어로 코드를 작성하다 보면, 작성 표준에 잘 맞추어 작성하고 있는지 궁금할 때가 있다. 이는 구글 공식 가이드라인과 kotlin 공식 가이드라인이 존재하기 때문에, 이 문서들로도 해결된다. 그러나 실제로 코드를 짜다보면, 이를 간과하고 작성하게 되는 부분이 많다. 하지만 ktlint를 사용하게 되면, 작성한 코드에 대해 검사를 실시해주어 곧바로 수정이 가능하다. 또한 지속적으로 자각하여 코딩을 진행할 수 있게 된다. 📍 코드 검사 예시 > Task :app:ktlint ../Adapter.kt:3:1: Imports must be ordered in lexicographic order without any empty lines in-between ../Adapter.k..

    [Android] Retrofit With Coroutine (In MVVM Architecture)

    📌 Retrofit with Coroutine (In MVVM Architecture) 이 문서는 Coroutine 선행 공부가 되신 분들이 보기 쉽게 작성되었습니다 Coroutine에 대하여 좀 더 공부하고 싶다면 아래와 같은 페이지를 참조하세요! https://zladnrms.tistory.com/116 [Kotlin] Coroutine 연습 문제 Coroutine을 공부하면서, 문서를 꼼꼼히 읽어봐도 실전에서는 분명 헷갈리는 부분이 적지 않았다. 그래서 다시 Unit Test를 통하여 연습하던 중에, 이를 문제 - 정답 형식의 문서로 작성해두면 좋을 것 같아 남기.. zladnrms.tistory.com Coroutine을 학습하기 전 까지는 네트워크 비동기 처리를 위하여 Retrofit2을 사용하..

    Android Coroutine 정리

    Kotlin Official Site Document Table of contents Coroutine basics Cancellation and timeouts Composing suspending functions Coroutine context and dispatchers Exception handling and supervision Channels (experimental) Shared mutable state and concurrency Select expression (experimental) Additional references Guide to UI programming with coroutines Guide to reactive streams with coroutines Coroutine..