Tag: recyclerview

Parallax effect on each item in a recycler view?

I’m trying to play with Parallax and getting some weird bugs, wondering if anyone can add some input to it. The only app I’ve seen implement parallax effectively is soundcloud. It’s quite subtle, but each item has an image background and it has he parallax effect as you scroll. I’ve created a custom RecyclerView to […]

Problems with implementing contextual action mode in recyclerview fragment

I hacked together my first app from a bunch of tutorials. With the help of one of them I implemented a RecyclerView inside a fragment which is used by the main activity. Now I found another tutorial which I want to use to implement multi-selection with the contextual action mode. The big problem is, that […]

Android: SortedList with duplicates

I have some problems understanding RecyclerViews SortedList. Lets say I have a very simple class only having a very simple class holding data: public class Pojo { public final int id; public final char aChar; public Pojo(int id, char aChar) { this.id = id; this.aChar = aChar; } @Override public String toString() { return “Pojo[” […]

Android: Suggestion required for Update recycler view on item selected from spinner

I am new to recycler view. My requirement is as follows: – I have to call a web service that will give two arrays. One with data I need to show in the list. For this purpose, I am using RecyclerView. The other array is of statuses, which I am showing in spinner. This web […]

SQLite data to a RecyclerView

The app has data in a SQLite database. The UI is primarily a RecyclerView. The question is how to best to transfer data from the database into the UI, whilst keeping off the main thread? I originally planned to use a CursorLoader, ContentProvider, and RecyclerView. But reading around it looks like RecyclerView has no out-of-the-box […]

Android RecyclerView smooth scroll to view that's animating their height

I have a RecyclerView with Expandable Child Views, when the child ViewGroup is clicked it inflates an amount of views animating the ViewGroup height from 0 to the measured viewgroup height, like the following gif: The problem is: I’m calling smoothScrollToPosition on recyclerView, it smooth scroll to the view position, but it considers the current […]

Force RecyclerView to redraw Android

Is there any way to redraw all items of RecyclerView? I have some Themes (in style.xml) and after changing the theme, I need the RecyclerView to be redrawn. So I want a method that will force to re-call onCreateViewHolder for each items of the adapter. I tried to: call adapter.notifyDataSetChanged but onCreateViewHolder is not called […]

RecyclerView gravity

I have a recylcler view, but it seems that does not implement the setGravity method. My list is horizontally aligned, but I need it to be centered. How do I do that? fragment_my_zone_item_controlled.xml <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”match_parent” android:background=”@color/dark_grey”> <FrameLayout android:id=”@+id/fragment_my_zone_item_controlled_content” android:layout_width=”match_parent” android:layout_height=”match_parent” android:layout_below=”@+id/fragment_my_zone_item_controlled_tabs” android:layout_marginBottom=”12dp” android:layout_marginTop=”12dp” /> <android.support.v7.widget.RecyclerView android:id=”@+id/fragment_my_zone_item_controlled_tabs” android:layout_width=”match_parent” android:layout_height=”44dp” android:background=”@color/action_bar_color” android:scrollbars=”none” […]

How to push recylerView up when keyboard appear?

I want to build a message layout as in whatsapp. I have an edittext and a recylerView. the problem is when the keyboard appear it hide the messages ! So lets say this the RecylerView: —item 1— —item 2— —item 3— —item 4— —EditText— when the the keyboard appear , I get this : —item […]

Admob Native Ads inside a Recylerview displays blank space before loading

I have implemented Admob native ads in my application. It has been placed to display once for every 4 items in my recyler view. The problem is before ads are being displayed, a blank space will be shown up for around 3 to 5 seconds til the ad is loaded. I need help to remove […]

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