The use of RecyclerView linear layout manager LinearLayoutManager in Android

Use LinearLayoutManager with RecyclerView to make vertical and horizontal list layouts.

Common methods of LinearLayoutManager

  • Constructor: You can specify the direction of the list and whether to start the layout in the opposite direction.
  • setOrientation: Set the direction of the list, the value can be LinearLayout.HORIZONTAL or LinearLayout.VERTICAL.
  • setReverseLayout: Set whether to start the layout in the opposite direction, the default is false. If set to true, the vertical direction will start layout from bottom to top, and the horizontal direction will start layout from right to left.

 

Guess you like

Origin blog.csdn.net/weixin_38322371/article/details/114890383