Tag: recyclerview

RecyclerView Animation on Item Click

I am trying to implement my own recyclerview Animation – I would like to achieve this without using any external libraries. Here is what the theoretical animation should look like. The user clicks an item on the List and an animation occurs which opens up another View. On a high level with minimal code, possibly […]

Error:Attribute “theme” has already been defined

I am using Android studio for building application. I am using this following dependencies: play services : compile ‘com.google.android.gms:play-services:5.2.08’ app combat v7 : compile ‘com.android.support:appcompat-v7:21.0.0’ support Cardview : compile ‘com.android.support:cardview-v7:21.0.0’ support Recycler view : compile ‘com.android.support:recyclerview-v7:21.0.0’ I am getting following error while building my app: app/build/intermediates/exploded-aar/com.google.android.gms/play-services/5.2.08/res/values/wallet_attrs.xml Error:Attribute “theme” has already been defined Code Styles.xml <resources> […]

Support RecyclerView doesn't show anything until touched

I’m using the support RecyclerView in my app, and I see the most bizarre thing. It doesn’t display any items until I touch to scroll. Then, all of a sudden, the RecyclerView populates itself. I have verified that the list backing the adapter is populated, and that onCreatViewHolder and onBindViewHolder are never called until a […]

Confirmation and undo removing in RecyclerView

I have got a list of simple items in RecyclerView. Using ItemTouchHelper it was very easy to implement “swipe-to-delete” behavior. public class TripsAdapter extends RecyclerView.Adapter<TripsAdapter.VerticalItemHolder> { private List<Trip> mTrips; private Context mContext; private RecyclerView mRecyclerView; […] //Let adapter know his RecyclerView. Attaching ItemTouchHelper @Override public void onAttachedToRecyclerView(RecyclerView recyclerView) { ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new TripItemTouchHelperCallback()); […]

LinearLayoutManager setReverseLayout() == true but items stack from bottom

This seems like it would be an easy solution, but it seems that setting private RecyclerView mRecyclerView; private RecyclerView.Adapter mAdapter; private LinearLayoutManager mLayoutManager; …. // More code mRecyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view); // Add item decoration mRecyclerView.addItemDecoration(new SpacesItemDecoration(DIVIDER_SPACE)); // use this setting to improve performance if you know that changes // in content do not change […]

Android TV RecyclerView focus interaction

I’m currently using a regular RecyclerView with GridLayoutManagerwith different spanCount depeding on the viewType for an Android TV app. All is working decent but I have 2 issues: If you long press the dpad down to scroll fast between the items sometimes the focus is lost to a view that isn’t a child of the […]

How to animate recyclerview on scroll like Google plus/Google newsstand?

How do I animate the RecyclerView when the items appear for first time and also when the user scrolls, just like the way it works for the google plus app or the google news stand app. Also I read somewhere that RecyclerView does not directly support animation when the user scrolls; if this is true, […]

Animate RecyclerView when scrolling

Is there any way to animate the elements of a RecyclerView when I scroll it? I took a look at DefaultItemAnimator and RecyclerView.ItemAnimator, but that animations seems to be only called if the dataset has changed, please correct me if I am wrong. I’m a little confused about RecyclerView.ItemAnimator.animateMove() when is it called? I put […]

Not able to add empty view below Recyclerview

I was trying my hand with recyclerview and floating action button for an app. The problem I encountered is that the floating action button hinders with the buttons in recyclerview. I looked up how the android apps such as phone app(one where you have contacts displayed in gridvew) are designed to deal with this, I […]

(Smooth)ScrollToPosition doesn't work properly with RecyclerView

I’m using basic RecyclerView with GridLayoutManager. I observed that nor smoothScrollToPosition nor scrollToPosition works properly. a) when using smoothScrollToPosition I often receive error from RecyclerView “RecyclerView﹕ Passed over target position while smooth scrolling.” and RecyclerView is not scrolled properly (often it misses the targeted row). This is observed mostly when I’m trying to scroll to […]

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