android-recyclerview

(recycle) listview - calculate height

独自空忆成欢 提交于 2019-12-11 11:05:06
问题 I have multiple lists in my Android app, the activities that contain those (recycle) listviews also contain other content. Putting a listview below the content works fine without any custom modelling. However, when scrolling in the list, it is only scrolling the list, thus showing about 1 or 2 items, while we would like to scroll the whole activity, so that the content moves up and the complete list is shown. To make an activity scrollable, we would need a ScrollView, this goes a bit against

RecyclerView Mixing Up Items

孤人 提交于 2019-12-11 10:54:15
问题 I have a RecyclerView that displays a list of images and text that are downloaded from the internet via a RecyclerView adapter. The problem arises when I scroll up and down the RecyclerView. As I scroll down the list initially, everything seems fine and all the CardViews (a cardview containing an image and some text) are in their respective positions. However, as I begin to scroll back up, all the previous CardViews are replaced by the lowest CardView. The lowest item of the recyclerview is

installing repository for com.android.support.recyclerview-v7 for Android Studio error

谁都会走 提交于 2019-12-11 10:53:59
问题 I'm a beginner in android studio and I try to use a recyclerView. When I try to add compile 'com.android.support.recyclerview-v7:21.0.+' to my gradle file, I get the error: failed to resolve com.android.support.receyclerview-v7v7:21.0.+. It proposes me to install repository and sync project. when I click it, i get this error: SDK Path C:\User\userName\AppData\Local\Android\sdk1 loading SDK information ignoring unknown package filter 'extra-android-m2repository' warning: The package filter

Android: How to check if a Checkbox is checked in an item of a RecyclerView

戏子无情 提交于 2019-12-11 10:48:38
问题 I've been trying to find out how I could check if a checkbox was checked in a list item in a RecyclerView. I have seen some articles online but I could not understand what they meant. If anyone could help, that'd be great. Info about my app This is a little snippet of what it does. It is a contacts app. On one screen it lists out ALL of the user's contacts. I didn't use the contacts picker for this. I displayed the list as a recyclerview, each item in the recyclerview has a checkbox. The user

How to categorize list items in a recyclerview?

元气小坏坏 提交于 2019-12-11 10:45:28
问题 I am building a notifications list for an application I'm working on and I'm having trouble finding a way to take my list of notifications from the server and displaying them in separate lists in a RecyclerView. The end product would display the list of notifications with headers for Recent notifications and Older notifications, a la: <RECENT HEADER> <NOTIF-1> <NOTIF-2> <OLDER HEADER> <NOTIF-3> <NOTIF-4> <NOTIF-5> <NOTIF-6> except instead of angle-bracket text it's actual views representing

RecyclerView using DiffUtil, prevent to scroll bottom on change

杀马特。学长 韩版系。学妹 提交于 2019-12-11 10:36:59
问题 I have a problem with my recyclerViev , specifically with the scrolling. I have some list, which is updated in real time, some item is added, some removed, and everything is sorted by some parameter. So the item which was initially first on the list, can have its parameter changed, which will be in different position after the sorting. So my recyclerView is for example focusing on the initial item, and after change, when some item has "better" parameter is changing position with that initial

No adapter attached; skipping layout onCreateView()

ⅰ亾dé卋堺 提交于 2019-12-11 10:20:54
问题 Trying to implement RecyclerView into my application, I don't understand why i'm getting "No adapter attached; skipping layout" I thought i clearly set it up in the onCreateView. Some other posts suggested to move it to Oncreate() but when i do that i get many more errors. I followed this tutorial if it helps. Here is my Main Activity class I do not believe this is a duplicate of another question, although it might be similar. when moved to onCreate() the entire application crashes. public

RecyclerView scrolls to top after keyboard hides

风格不统一 提交于 2019-12-11 09:58:16
问题 I have a recyclerView with height and width matchParent , above and below some views. View below recyclerView is editText . When something is typed in editText and keyboard closes, recyclerView scrolls to top. Any idea why it is happening and how it can be resolved. Related xml at: https://gist.github.com/anonymous/42c38f8a50daf0f441552c985e29a309 回答1: You can try to add this code to your manifest: android:windowSoftInputMode="adjustPan" <activity android:name=".YourActivity" android

indexed query with FirestoreRecyclerAdapter

限于喜欢 提交于 2019-12-11 09:53:11
问题 FirebaseUI-Android provides for indexed queries when using a FirebaseRecyclerAdapter . That works well when accessing Firebase Realtime DB data as explained here: https://github.com/firebase/FirebaseUI-Android/blob/master/database/README.md#using-firebaseui-with-indexed-data But what about accessing Firestore data? It seems that FirestoreRecyclerAdapter does not support indexed queries via setIndexedQuery(keyref, dataref, ... ) How can I maybe execute the data query manually inside the

Android View setActive, setSelected and RecyclerView States

余生长醉 提交于 2019-12-11 09:47:36
问题 Currently I have a RecyclerView with a check box that can have three states. ticked, unticked or Locked. I understand I can make a custom view state. The question is more understand the behavior and of the recyclerview view holder binding. When the RecylcerView loads everything works as expected everything is unticked except for the locked items. When I clicked on an unlocked checkbox everything works as normal it check the box and un-checks the box fine. The problem comes as soon as I click