vlayout customizes a VirtualLayoutManager, which inherits from LinearLayoutManager and introduces LayoutHelper Virtual layout manager manages a series of layouthelpers, and gives the specific layout ability to LayoutHelper. Each LayoutHelper provides a layout method. The framework provides several common layout types, including grid layout, linear layout, waterfall flow layout, suspended layout, suction side layout, etc. In this way, the ability of mixed layout is realized, and the extension of external is supported, new LayoutHelper is registered, and special layout mode is realized. By providing a custom LayoutManager to RecyclerView, VirtualLayout is able to layout child views with different style at single view elegantly. The custom LayoutManager manages a serial of layoutHelpers where each one implements the specific layout logic for a certain position range items. By the way, implementing your custom layoutHelper and provding it to the framework is also supported.
Features
- LinearLayoutHelper provides linear layout as LinearLayoutManager
- FixLayoutHelper fixes the view at certain position of screen, the view does not scroll with whole page
- ScrollFixLayoutHelper fixes the view at certain position of screen, but the view does not show until it scrolls to it position
- FloatLayoutHelper floats the view on top of page, user can drag and drop it
- ColumnLayoutHelper performs like GridLayoutHelper but layouts all child views in one line
- OnePlusNLayoutHelper is a custom layout with one child view layouted at left and the others at right