profile
러닝커브를 따라서 등반중입니다.
태그 목록
전체보기 (105)kotlin(48)안드로이드(48)android(46)코틀린(32)1일1문서(16)medium(16)기초(9)jetpack(7)jetpack compose(6)navigation(5)epoxy(4)예제(4)json(4)fastcampus(3)MVVM(3)ViewModel(3)공유(3)touch(3)Event(3)Toyproject(3)RecyclerView(3)fragment(3)의존성주입(2)동기(2)di(2)dagger(2)비동기(2)예시(2)에러(2)compose(2)View(2)dataclass(2)댓글(2)링크(2)구현(2)Paging3(2)클린아키텍처(2)에폭시(2)오류(2)의존성(2)LiveData(2)Andorid(2)class(2)src(1)SharedFlow(1)정적 언어(1)패러다임(1)AndroidStudio(1)리사이클러뷰(1)커뮤니티(1)clipboard(1)sql(1)visibility(1)협업툴(1)데이터 공유(1)AsyncListDiffer(1)프로가드(1)DML(1)URI(1)CAA(1)페어프로그래밍(1)push(1)RX(1)coldflow(1)library(1)라이브러리(1)dimensions(1)OOP(1)entrypoint(1)재구성(1)엔트리포인트(1)requestDisallowInterceptTouchEvent(1)List(1)lint error(1)http(1)convert(1)응답코드(1)애자일(1)린트(1)withContext(1)무한스크롤(1)아임포트(1)Epoxy SnapHelper(1)범위 지정 함수(1)바텀시트(1)profile(1)boolean(1)동기적처리(1)postvalue(1)카카오(1)mutable(1)Eventbus(1)coroutine(1)oAuth(1)통신(1)스냅헬퍼(1)lottie(1)트렐로(1)구독(1)페이스북(1)애니메이션(1)url(1)DDL(1)fade in(1)람다(1)다이나믹링크(1)뷰페이저(1)backstack(1)클립보드(1)snapHelper(1)DP(1)앱 설치(1)콘텐츠 라벨(1)소프트키(1)proguard(1)옵저버(1)lateinit(1)with(1)tutorial(1)Dex(1)SharedPreference(1)navigate(1)throttle(1)debounce(1)Bitmap(1)webview(1)fade out(1)서버(1)NavController(1)명령형UI(1)터치영역(1)fragmentManager(1)분류(1)TCL(1)BackHandler(1)레트로핏(1)clipboard manager(1)PagingListAdapter(1)composition(1)autoscroll(1)푸시알림(1)Datastore(1)padding(1)문서 해석(1)오픈소스(1)activityviewmodels(1)계층(1)자동스크롤(1)GuideLine(1)위치(1)prevent(1)backpress(1)multi click(1)gson(1)login(1)라이브데이터(1)RxJava(1)apptheme(1)rearrangement(1)error(1)PendingIntent(1)공식문서(1)jitpack(1)opensource(1)늦은 초기화(1)RxAndroid(1)let(1)내비게이션바(1)클로저(1)네아로(1)백그라운드쓰레드(1)위치 저장(1)CS(1)캐시(1)DiffUtil(1)패딩(1)데이터스트림(1)also(1)foreach(1)fmc(1)이니시스(1)Collection(1)activityViewModel(1)pattern(1)context(1)flow(1)trello(1)힐트(1)State(1)popuptoinclusive(1)접근 제한자(1)update(1)obeserver(1)background(1)intercept(1)datastream(1)파싱(1)hilt(1)clone(1)난독화(1)ImageView(1)메세지(1)AAC(1)notion(1)manage(1)30(1)visiblee(1)데이터스토어(1)remember(1)(1)by lazy(1)파이어베이스(1)navigateup(1)setvalue(1)stateFlow(1)popupto(1)코루틴(1)카드결제(1)의존(1)dynamiclink(1)FragmentManagerApi(1)notification(1)소셜(1)ListAdapter(1)프로그래밍 언어(1)infiniteitem(1)이미지뷰(1)테크스펙(1)Intent(1)메시지(1)Configuration(1)설치 여부(1)확인(1)선언형UI(1)동적링크(1)DCL(1)높이(1)노티(1)변환(1)커뮤니티 댓글(1)대댓글(1)requireparentfragment(1)Expand(1)contentdescription(1)nestedcomment(1)해석(1)popbackstackk(1)뷰모델(1)Access Modifier(1)업데이트(1)BottomSheetBehavior(1)일반결제(1)hotflow(1)메인쓰레드(1)retrofit2(1)웹뷰(1)Pending(1)정기결제(1)rxkotlin(1)MVP(1)deeplink(1)카드등록(1)컴포즈(1)json 파싱(1)안드로이드 결제(1)set(1)run(1)jitpack.io(1)retrofit(1)mvp패턴(1)apply(1)Refresh(1)Comment(1)종료(1)대응(1)기본(1)PagingAdapter(1)메모리(1)페이징(1)Expected BEGIN_OBJECT but was STRING at line 1 column 1 path(1)ConstraintLayout(1)airbnb(1)카카오톡 공유(1)Immutable(1)다중 클릭(1)

ViewModel 공유하기

액티비티 위에 프래그먼트가 띄워져있는 상황에서 뷰모델을 공유할 상황이 생긴다.기존의 viewmodel을 생성할때이렇게 생성했다. 하지만 이렇게 생성하게 되면 fragment에 종속된다.다른 fragment와 공유하고 싶다면 viewmodels()대신이렇게 설정해햐 한다

2021년 11월 16일
·
0개의 댓글