android-recyclerview

Issue with SearchBar and RecyclerView and CardView

て烟熏妆下的殇ゞ 提交于 2019-12-11 19:14:22
问题 I'm using the SearchBar following the tutorial Android Development Tutorial - Search on SQLite data. I have a problem with the layout. Please see attached image. I'm using CardView and RecyclerView . Can you please tell me what is wrong in my layout? check image main_activity.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"

android Change background color of odd rows in RecyclerView when using DiffUtil

橙三吉。 提交于 2019-12-11 19:13:40
问题 I have a RecyclerView and Every odd row has a different background color. I try to add DiffUtil to speed up the updates like this: import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.core.content.ContextCompat import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.RecyclerView import com.asdf.android.R import com.asdf.android.network.model.trade.MarketTradeItem import kotlinx.android

How can reference two lists in one viewholder?

試著忘記壹切 提交于 2019-12-11 18:48:08
问题 I need your help.. First, Can I use two lists in one viewholder? ** This is my Recyclerview Viewholder structure. | (User's name) [ PBMS ]| | (User's PBMS) [ Matching rate ]| *PBMS means comparing my prefer to others and return matching-rate. *Also I have two model(User, PBMS). They have getter/setter/empty constructor, full constructor. *If I search users on specific condition, it will show users with matching result in the recyclerview. ** This is my firebase database. tkitaka ㄴUser

When Deleting View with Swipe in RecyclerView doesn't deletin in SharedPreference

拥有回忆 提交于 2019-12-11 18:41:33
问题 I am trying delete View with Swipe in RecylerView , I saved in SharedPreferences to selected View with favorite button. After I saved to selected View in SharedPreferences , I am trying remove Favorite Activity with Swipe to left ,I was done this but When I return Favorite Activity , I saw old items doesn't updated SharedPreferences When I swipe to left. How can I do this? public class SharedPreference { public static final String PREFS_NAME = "NKDROID_APP"; public static final String

Recycler View Not Printing Given Data

杀马特。学长 韩版系。学妹 提交于 2019-12-11 18:31:57
问题 I'm trying to incorporate SlideNerd's instructions on how to create a recycler view into my CS project. He was teaching how to make a recycler view inside the navigation drawer and I'm trying to make one in the main activity. Here's my current output There's one recycler element that shows up, but the problem is that it is the example text and icon in the XML code that is initialized.The data in the ChooseItemRecyclerFragment is not being passed to the ItemViewholder and not displaying. Can

Layout_behavior with an Adapter inside another one

给你一囗甜甜゛ 提交于 2019-12-11 18:14:57
问题 I have been searching and found some close questions and answer but none of them works. I'm using CoordinatorLayout for a list RecyclerView with AppBarLayout and ToolBar . My Goal: The ideia is very simple, when you roll the view first the AppBar Collapse in the Toolbar and after that the RecyclerView start to scroll. My Hierarchy: My Fragment RecyclerView(vertical) has a Adapter-A with a new layout, and this adapter call a second adapter-B for the RecyclerView(horizontal). So I Have a struct

Android - Recycleview Inside Scrollview

白昼怎懂夜的黑 提交于 2019-12-11 17:49:47
问题 I am building a social app and have an activity for viewing user's profiles (like Instagram). I basically want to be able to scroll normally and naturally from the ScrollView to the RecyclerView and viceversa. So for example, if the user does a strong swipe from the bottom of the RecyclerView I want it to take him up to the top of the ScrollView . I was thinking of the following solution (but don't really know how to do it): make the RecyclerView's height "expanded" so it would contain all

Adjust Items inside recycler view + orientation changes

ぐ巨炮叔叔 提交于 2019-12-11 17:39:25
问题 I have this problem - I guess someone can surely put light on what the heck is going wrong here... My overall flow goes like this - Activity(@+id/activity) shows a fragment(@+id/image_container) from screen bottom when a button is tapped(keyboard closes if present and fragment shown sliding upwards from bottom), this fragment shows a viewpager with page indicator in linear layout, viewpager shows another fragment which contains recycler view with horizontal gridlayoutmanager. This recycler

How to pass Retrofit response to RecyclerViewAdapter in Android Google Books API

前提是你 提交于 2019-12-11 17:34:03
问题 I've been using Retrofit2.0 (just learned how to use it) to retrieve Google Books API info, I have finally succeeded. But now I don't know know how to pass it to RecyclerView since now my models have gotten revised and now deal with nested models (I think that is the correct term) compared to what I had before to (old Stack Overflow question here). Currently, I'm getting this error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.android_myneighborsbookshelf, PID: 8806 java.lang

Hide/show buttons inside recyclerview

随声附和 提交于 2019-12-11 17:32:27
问题 I want to show and hide some buttons within the recycler view in recycler item clicked. For example I have a recyclerw view with two items like this On click of the 1st item, the buttons Edit and delete should be displayed. My adapter code is here: using Android.Support.V7.Widget; using Android.Views; using Android.Widget; using System; using System.Collections.Generic; namespace RecyclerViewTest { internal class BuyerAdapter : RecyclerView.Adapter { public List<Buyer> mlivestock; public