android-recyclerview

Cannot retrieve data using FirebaseRecyclerOptions after upgrading to FirebaseUI 3.0

允我心安 提交于 2021-02-10 05:50:23
问题 I'm using FirebaseRecyclerOptions because I upgraded to the new FirebaseUI 3.0 version but now I cannot retrieve anything from the database. The same code used to work very well in the old FirebaseRecylcerAdapter method. It seems like it doesn't even enter onBindViewHolder . Initializations linearLayoutManager = new LinearLayoutManager(this); linearLayoutManager.setReverseLayout(true); linearLayoutManager.setStackFromEnd(true); recyclerView = findViewById(R.id.main_recycler); recyclerView

How to snap to particular position of LinearSnapHelper in horizontal RecyclerView?

血红的双手。 提交于 2021-02-10 03:26:31
问题 How can I snap to particular position for LinearSnapHelper() in horizontal RecyclerView? There is a function scrolltoposition for RecyclerView which scroll to that position but did not keep it in center for this snaphelper. I am looking for something like below image. So when I set to particular position, it will keep it in center. I dont find anything related to select position for SnapHelper i find this , but this doesn't help me. Any help would be appreciated. 回答1: For horizontal

How to snap to particular position of LinearSnapHelper in horizontal RecyclerView?

為{幸葍}努か 提交于 2021-02-10 03:26:21
问题 How can I snap to particular position for LinearSnapHelper() in horizontal RecyclerView? There is a function scrolltoposition for RecyclerView which scroll to that position but did not keep it in center for this snaphelper. I am looking for something like below image. So when I set to particular position, it will keep it in center. I dont find anything related to select position for SnapHelper i find this , but this doesn't help me. Any help would be appreciated. 回答1: For horizontal

Where is the RecyclerView in the support library?

扶醉桌前 提交于 2021-02-10 03:18:35
问题 I'm working on an app which uses the RecyclerView component. I was checking my build.gradle file and it had these dependencies: compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:cardview-v7:25.3.1' compile 'com.android.support.constraint:constraint-layout:1.0.0-beta5' compile 'com.android.support:design:25.3.1' testCompile 'junit:junit:4.12' compile 'com.android.support:support-v4:25.3.1' There was no 'com.android.support:recyclerview-v7:25.3.1', and yet I had a

How to snap to particular position of LinearSnapHelper in horizontal RecyclerView?

橙三吉。 提交于 2021-02-10 03:18:20
问题 How can I snap to particular position for LinearSnapHelper() in horizontal RecyclerView? There is a function scrolltoposition for RecyclerView which scroll to that position but did not keep it in center for this snaphelper. I am looking for something like below image. So when I set to particular position, it will keep it in center. I dont find anything related to select position for SnapHelper i find this , but this doesn't help me. Any help would be appreciated. 回答1: For horizontal

Where is the RecyclerView in the support library?

五迷三道 提交于 2021-02-10 03:17:04
问题 I'm working on an app which uses the RecyclerView component. I was checking my build.gradle file and it had these dependencies: compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:cardview-v7:25.3.1' compile 'com.android.support.constraint:constraint-layout:1.0.0-beta5' compile 'com.android.support:design:25.3.1' testCompile 'junit:junit:4.12' compile 'com.android.support:support-v4:25.3.1' There was no 'com.android.support:recyclerview-v7:25.3.1', and yet I had a

Where is the RecyclerView in the support library?

倖福魔咒の 提交于 2021-02-10 03:16:49
问题 I'm working on an app which uses the RecyclerView component. I was checking my build.gradle file and it had these dependencies: compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:cardview-v7:25.3.1' compile 'com.android.support.constraint:constraint-layout:1.0.0-beta5' compile 'com.android.support:design:25.3.1' testCompile 'junit:junit:4.12' compile 'com.android.support:support-v4:25.3.1' There was no 'com.android.support:recyclerview-v7:25.3.1', and yet I had a

Where is the RecyclerView in the support library?

眉间皱痕 提交于 2021-02-10 03:15:14
问题 I'm working on an app which uses the RecyclerView component. I was checking my build.gradle file and it had these dependencies: compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:cardview-v7:25.3.1' compile 'com.android.support.constraint:constraint-layout:1.0.0-beta5' compile 'com.android.support:design:25.3.1' testCompile 'junit:junit:4.12' compile 'com.android.support:support-v4:25.3.1' There was no 'com.android.support:recyclerview-v7:25.3.1', and yet I had a

Observer not triggered on room database change

白昼怎懂夜的黑 提交于 2021-02-09 07:56:20
问题 I am trying to update a RecyclerView when a room database is changed. However the onChanged method of the observer defined in the MainActivity does not get called, when a change to the database occurs. If I let the DAO return LiveData instead of a List<> and use LiveData in my ViewModel it works as intended. However I need MutableLiveData as I want to change my query to the database during runtime. My setup: MainActivity.java BorrowedListViewModel viewModel = ViewModelProviders.of(this).get

Observer not triggered on room database change

泄露秘密 提交于 2021-02-09 07:55:43
问题 I am trying to update a RecyclerView when a room database is changed. However the onChanged method of the observer defined in the MainActivity does not get called, when a change to the database occurs. If I let the DAO return LiveData instead of a List<> and use LiveData in my ViewModel it works as intended. However I need MutableLiveData as I want to change my query to the database during runtime. My setup: MainActivity.java BorrowedListViewModel viewModel = ViewModelProviders.of(this).get