본문 바로가기
반응형

Android11

[Android] Compose Auto Scroll pager 자동으로 Scroll 되고 사용자가 Scroll 할 수 있는 Pager 가 필요한 경우가 있다. 얼마전까지 Accompanist 에 있었지만 deprecated 되어서 구현했다. 중요한 것은 pagerState의 현재 page 값을 받아오는 state다. pagerState.settledPage The page that is currently "settled". This is an animation/gesture unaware page in the sense that it will not be updated while the pages are being scrolled, but rather when the animation/scroll settles. Please refer to the sample to.. 2023. 7. 24.
Caused by: org.gradle.api.GradleException: 'compileDebugJavaWithJavac' task (current target is 1.8) and 'kaptGenerateStubsDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version. Android Studio 를 업데이트 하고 Gradle 업데이트를 하니 아래와 같은 에러가 발생했다. Caused by: org.gradle.api.GradleException: 'compileDebugJavaWithJavac' task (current target is 1.8) and 'kaptGenerateStubsDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version. compileOptions에서 JavaVersion 을 업데이트 하면 된다. Gradle 파일에 따라 아래와 같이 수정하면 된다. compileOptions.run { sourceCompatibilit.. 2023. 6. 16.
[Android] Compose lifecycle Compose lifecycle https://developer.android.com/jetpack/compose/lifecycle?hl=ko 컴포저블 수명 주기 | Jetpack Compose | Android Developers 컴포저블 수명 주기 이 페이지에서는 컴포저블의 수명 주기에 관해 알아보며 Compose에서 컴포저블에 재구성이 필요한지를 결정하는 방법을 살펴봅니다. 수명 주기 개요 상태 관리 문서에 설명된 developer.android.com 컴포지션은 초기 컴포지션을 통해서만 생성되고 리컴포지션을 통해서만 업데이트될 수 있습니다. 컴포지션을 수정하는 유일한 방법은 리컴포지션을 통하는 것입니다. https://myseong.tistory.com/47 Compose State, Statef.. 2022. 3. 26.
[Android] Compose State, Statefull, Stateless, State Hoisting 하기 내용의 일부는 이전 포스팅에서 가지고 왔습니다. 중요하다고 생각이 되기 때문입니다. https://myseong.tistory.com/46 Compose 와 선언형 UI 요즘 핫한? Compose 를 사용해보고 있습니다!!!! Wow!!!!! 오랜만의 포스팅이라 두서없이 작성이 되었습니다......ㅎㅎ Compose : 구성하다, 작성하다, 합성 출처 : https://en.dict.naver.com/#/search?range=all.. myseong.tistory.com Compose 의 재구성 구성 가능한 함수는 순서와 관계없이 실행할 수 있습니다. 구성 가능한 함수는 동시에 실행할 수 있습니다. 재구성은 최대한 많은 수의 구성 가능한 함수 및 람다를 건너뜁니다. 재구성은 낙관적이며 취소될 수 .. 2022. 3. 26.
반응형