I can't find populateViewHolder Method in FirebaseRecyclerAdapter class

后端 未结 2 1437
一个人的身影
一个人的身影 2020-12-01 17:31

I want to use FirebaseRecyclerAdapter in my project and I used this code segment in a previous Project

FirebaseRecyclerAdapter

        
2条回答
  •  再見小時候
    2020-12-01 17:50

    In addition to @Lucy's answer. Now, there are architecture component lifecycle owners. As per the firestoreui android doc

    If you don't want to manually start/stop listening you can use Android Architecture Components to automatically manage the lifecycle of the FirestoreRecyclerAdapter. Pass a LifecycleOwner to FirestoreRecyclerOptions.Builder.setLifecycleOwner(...) and FirebaseUI will automatically start and stop listening in onStart() and onStop().

    In this specific situation,personsOptions.setLifecycleOwner(myFragmentOrActivity.this)

提交回复
热议问题