android-recyclerview

Google play store like interface using recycler view

爷,独闯天下 提交于 2020-01-12 14:57:28
问题 My assignment is to create an interface much same like Google Play Store.There will a Category name followed by 3 or 4 cards (horizontal) followed by More button. Then again next category. I already had implemented this using nesting the horizontal listview inside Vertical listview. I know, I can achieve this by using the Recycler view with LinearLayoutManager with horizontal orientation. Using this I'll be having one only row. My question is how do I add 2nd, 3rd row to this? Should I use

Horizontal RecyclerView inside ListView not scrolling very smooth

时间秒杀一切 提交于 2020-01-12 13:46:45
问题 I have a ListView , each of whose items is a Horizontal RecyclerView . The problem that I am facing is, the horizontal scroll is not very smooth. If I scroll/swipe in a perfectly horizontal direction, then it works fine but if the scroll is even slightly non-horizontal (say at a 10 degree angle to horizontal), it regards that as up/down scroll rather than left / right, due to the parent ListView . I tried this method: recyclerView.setOnTouchListener(new FlingRecyclerView.OnTouchListener() {

Horizontal RecyclerView inside ListView not scrolling very smooth

…衆ロ難τιáo~ 提交于 2020-01-12 13:46:34
问题 I have a ListView , each of whose items is a Horizontal RecyclerView . The problem that I am facing is, the horizontal scroll is not very smooth. If I scroll/swipe in a perfectly horizontal direction, then it works fine but if the scroll is even slightly non-horizontal (say at a 10 degree angle to horizontal), it regards that as up/down scroll rather than left / right, due to the parent ListView . I tried this method: recyclerView.setOnTouchListener(new FlingRecyclerView.OnTouchListener() {

RecyclerView inside a ScrollView/NestedScrollView does not scroll properly

百般思念 提交于 2020-01-12 08:40:07
问题 I have a layout which has a CardView and a FloatingActionButton associated with it. There is a list of replies below the CardView (which is a RecyclerView ). Sometimes the CardViews' height is greater than the screen, so I have used layout_height="wrap_content" for the CardView and wrapped the whole LinearLayout inside a ScrollView . However, this causes a problem(since it is a scrolling view inside a ScrollView ) while scrolling the items of the RecyclerView . As suggested in some of the

Using RecyclerView with Card

て烟熏妆下的殇ゞ 提交于 2020-01-12 07:05:25
问题 I have some RecyclerView with Card items. And on preLollipop devices it looks fine. But on Lollipop it looks without any spacing between child cards. I tried to use margin and padding, but it didn't help. When I use margin on lollipop it looks fine, but with the same margin on preLollipop spacing is very big. Once again: why is there different spacings? Which property should I use to fix it? 回答1: This is happening because on L, shadows are outside the the View bounds but pre-L, they are

Using RecyclerView with Card

不羁岁月 提交于 2020-01-12 07:04:30
问题 I have some RecyclerView with Card items. And on preLollipop devices it looks fine. But on Lollipop it looks without any spacing between child cards. I tried to use margin and padding, but it didn't help. When I use margin on lollipop it looks fine, but with the same margin on preLollipop spacing is very big. Once again: why is there different spacings? Which property should I use to fix it? 回答1: This is happening because on L, shadows are outside the the View bounds but pre-L, they are

How to show part of next/previous card RecyclerView

折月煮酒 提交于 2020-01-12 04:43:10
问题 What is the best strategy to achieve this feature: I Have a horizontal RecyclerView with cards. Each card will fulfil the entire screen, but I want it to show part of the next card and previous one if it has more than one item. I know I can achieve this by setting my card android:layout_width at the adapter to have a specific DP like 250dp instead of match_parent . But it doesn't look like a proper solution. This is my code: Activity with RecyclerView: class ListPokemon : AppCompatActivity()

How to hide divider when delete animation happens in recycler view

二次信任 提交于 2020-01-12 04:11:28
问题 RecyclerView by default, does come with a nice deletion animation, as long as you setHasStableIds(true) and provide correct implementation on getItemId . Recently, I had added divider into RecyclerView via https://stackoverflow.com/a/27037230/72437 The outcome looks as following https://www.youtube.com/watch?v=u-2kPZwF_0w https://youtu.be/c81OsFAL3zY (To make the dividers more visible when delete animation played, I temporary change the RecyclerView background to red) The dividers are still

Creating an expandable RecyclerView

谁说胖子不能爱 提交于 2020-01-11 17:08:22
问题 I'm trying to implement a recyclerview that behaves like my sketch below: The idea is that there is a parent list, when an list item in the parent list is tapped, that list item reveals a child list that contains it's own data. when a list item is tapped in the child list, the value of that child is reflected and updates the value of the parent in the parent list item. I've tried to get it working for the past 3 days to no avail. I tried using the AdvancedReyclerview library but to a beginner

RecyclerView: wrong position in filtered List

假装没事ソ 提交于 2020-01-11 13:21:28
问题 I have a RecyclerView list of CardView items. I then use a simple filter method with a SearchView widget to filter the list. When I then click on a filtered CardView to launch a CardViewDetails Activity, the UI is showing the CardView from the original List and not the filtered List. For example, I have a list of twenty items in the original List. When I enter a search constraint the filtered List correctly shows three CardViews in the RecyclerView. When I click on the third CardView in the