Tag: recyclerview

RecyclerView Swipe with a view below not detecting click

I have a RecyclerView row layout like this <Layout> <BackgroundView> <ForegroundView> </Layout> I am using ItemTouchHelper to handle swipes (partial) on the foreground view like @Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { adapter.onItemSwiped(viewHolder); } @Override public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) { View foregroundView […]

How to map a list of list to RecyclerView

I am trying to map a List<List<Object>> to a RecyclerView in Android, but the result is totally messed up. For example, I have a list of list like this (just for explaining, not my real case): List<List<String>> list = {{a, b, c}, {d, e}, {f, g, h, i}}; the Recyclerview should display like (first row […]

How to implement coverflow with recyclerview

I’m trying to implement a something like coverflow with recyclerview on android but i can’t find the way to do it(already searched on google). I know there is this library https://github.com/davidschreiber/FancyCoverFlow but is no longer maintained and the publisher said that we could implement this behavior with recyclerview, can someone point me to the right […]

Making ItemDecoration move with Animation

I implemented ItemDecoration into my RecyclerView along with an Animation that plays whenever the RV is loaded. However, I noticed that the decoration appears already at the bounds before the animation completes, and I want to have the decoration move in with the animation at the same time. How would I do this? So far, […]

Is there a way to make Recyclerview Scrollbar thumb of fixed height?

I don’t want my custom scrollbar thumb to grow and shrink with the list size. While it worked with ListView and GridView, I can’t find any way of doing it with RecyclerView. I could find fast scrollers for linear layout but they are not working with gridlayout. As for example, I am using RecyclerViewFastScroller library. […]

Does Glide queue up every image request? Recyclerview loads are very slow when scrolling

I have been seeing very long load times for images in our app using Glide 3.6 + a RecyclerView using a GridLayoutManager. The images are all around 20kb-40kb. It seems that glide queues up all the requests which causes the images to take quite awhile to load once you start scrolling further down the list. […]

recyclerview No adapter attached; skipping layout

just implemented Recyclerview in my code, replacing Listview. everything works fine. The objects are displayed. but logcat says 15:25:53.476 E/RecyclerView﹕ No adapter attached; skipping layout 15:25:53.655 E/RecyclerView﹕ No adapter attached; skipping layout for the code ArtistArrayAdapter adapter = new ArtistArrayAdapter(this, artists); recyclerView = (RecyclerView) findViewById(R.id.cardList); recyclerView.setHasFixedSize(true); recyclerView.setAdapter(adapter);“ recyclerView.setLayoutManager(new LinearLayoutManager(this)); as you can see I have […]

RecyclerView item decoration

I have a RecyclerView with a GridLayoutManager. I set a custom ItemDecoration: public class ListDetailsItemDecoration extends RecyclerView.ItemDecoration { private int space; public ListDetailsItemDecoration(int space) { this.space = space; } @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { int itemPosition = parent.getChildPosition(view); outRect.left = space; outRect.right = space; outRect.bottom = space; if(itemPosition […]

Android How to recycle bitmap correctly when using RecyclerView?

As google’s said we must manually call Bitmap.recycle() when the bitmap not use below Android 3.0 because memory are keep in native heap. So we could have a reference count for a Bitmap and check if need to recycle bitmap in ImageView’s onDetachedFromWindow() when using ListView. This is the solution from Google’s demo project Bitmapfun(ImageFetcher). […]

Is it possible to drag item outside of RecyclerView?

I need to somehow notify RecyclerView, when I drag and drop item from another RecyclerView onto it. Is it possible? Or should I use classic Drag and drop framework? RecyclerView with blue items is in one fragment and RecyclerView with red items is in other fragment. I also try to use ItemTouchHelper but it’s onMove() […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.