[Android] 종속성 주입 (Dependency injection)
Dependency injection (DI) is a technique widely used in programming and well suited to Android development. By following the principles of DI, you lay the groundwork for good app architecture. Implementing dependency injection provides you with the following advantages: Reusability of code, Ease of refactoring, Ease of testing
[Android] 2018 Google IO - AndroidX - 새로운 패키지 정리
그동안 `com.android.support.*` 또는 `android.support.*`와 작년에 공개한 Android Architecture Component 에서 사용하던 `android.arch.*`의 패키지 명을 안드로이드 라이브러리 28.0.0부터 새로운 `androidx.*` 패키지 명으로 교체한다고 한다.
[Kotlin] SharedPreferences 데이터 공유
데이터를 영구 저장하는 방법으로는 SharedPreferences(쉐어드프리퍼런스)가 있다. App에 포함되는 데이터 파일을 만들어서, 디바이스에 저장하는 방식이다. `(key, value)` 형태로 저장/로드한다. 또한 `.edit()` 에디터를 이용해야 데이터의 수정, 삭제 등의 액션이 가능하다. 주로 ‘editor’라는 변수명에 저장해서 사용한다.
[Kotlin] Transformations와 MediatorLiveData를 이용한 Reactive 패턴
Reactive 아키텍처는 수년 동안 Android에서 인기있는 주제였습니다. Android 컨퍼런스에서 꾸준히 언급 된 주제이며,보통 RxJava를 사용한 예제와 함께 언급되었었습니다.(아래의 Rx 섹션을 참조 해 주세요). Reactive 프로그래밍은 데이터 흐름 및 변경 사항 전파와 관련된 패러다임으로, 앱 구축을 단순화하고 비동기 동작의 결과값을 표시 할 수 있습니다.
[Kotlin] Transformations로 LiveData 변형하기
프로젝트 개발시 ViewModel을 사용함과 동시에 궁합이 잘 맞는 LiveData를 많이 사용한다. 그러나 Observavle을 위해 LiveData를 그 자체로만 사용한다면 LiveData의 편리함을 모두 누릴 수 없다. Transformations 클래스를 알아보면서 평소 생각없이 사용했던 LiveData를 더 가치있게 만들어보자.