With Recyclerview display data, with swiperefreshlayout drop-down refresh, so the Recyclerview should be displayed in the direction of the bottom up, that is, the first item appears at the bottom, the last item is displayed on the top, Each refresh adds new data to the top,
int Orientation, Boolean Reverselayout) constructor
You can set the display direction of the data, set Reverselayout to True to display the direction from bottom to top
/** * @paramcontext Current context, would be is used to access resources. * @paramOrientation Layout orientation. should be {@link#HORIZONTAL} or {@link* #VERTICAL}. * @paramReverselayout When set to true, layouts from end to start. */ PublicLinearlayoutmanager (Context context,intOrientationBooleanreverselayout) {setorientation (orientation); Setreverselayout (reverselayout);
The LayoutManager of Recyclerview