I am animating a RecyclerView and everything is working fine except that the views inside the RecyclerView are not showing properly.
Using common anim XML
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<translate
android:fromXDelta="-100%p"
android:toXDelta="0"
android:repeatCount="infinite"
android:duration="3000"/>
//IS WORKING FINE, MOVES RECYCLERVIEW ACROSS SCREEN !
Code for Recyclerview
Animation animLinear;
//OnCreate
recyclerView = findViewById(R.id.item_list);
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, true));
recyclerView.setAdapter(new Adapter_Main_Markets());
recyclerView.startAnimation(animLinear);
So, what's happening is the visible view of the recylerview is moving across the screen. I would like some help with moving the views inside the screen across the RecyclerView but I have no idea how to get the views inside the recyclerview properly.
//Adapter Main Markets
@Override
public void onBindViewHolder(@NonNull Adapter_Main_Markets.MyViewHolder holder, int position) {
holder.mIdView.setText("" + market_list[position]);
holder.mPriceView.setText("$ " + int_list[position]);
holder.mChangeView.setText(change_list[position]);
}
Will I need a loop for the views in the adapter? Maybe set animation there? Any help would be appreciated.
This is RecyclerView
Item A Item B Item C Item D Item E.
What actually shows on screen in the visible area is Item A Item B Item C.
So, of course, the visible "Item A Item B Item C" goes across the screen but that is not what I want.
I want Item A to go across the screen then Item B the Item C, then D, then E.