lmw
2023-03-11 4df5bb59e5fe9f9d140e5610f7772dd8a05a28d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.beloo.widget.chipslayoutmanager.layouter;
 
import android.graphics.Rect;
import android.view.View;
 
import java.util.List;
 
public interface ILayouter {
    /** add views from current row to layout*/
    void layoutRow();
    /** calculate view positions, view won't be actually added to layout when calling this method
     * @return true if view successfully placed, false if view can't be placed because out of space on screen and have to be recycled */
    boolean placeView(View view);
    /** Read layouter state from current attached view. We need only last of it, but we can't determine here which is last.
     * Based on characteristics of last attached view, layouter algorithm will be able to continue placing from it.
     * This method have to be called on attaching view
     * @return * @return true if view successfully attached, false if view can't be attached because out of space on screen */
    boolean onAttachView(View view);
 
    /** @return size of current row*/
    int getRowSize();
 
    /** @return top of current row*/
    int getViewTop();
 
    /** @return bottom of current row */
    int getViewBottom();
 
    /** @return size of previous row*/
    int getPreviousRowSize();
 
    List<Item> getCurrentRowItems();
 
    Rect getRowRect();
 
    void addLayouterListener(ILayouterListener layouterListener);
 
    void removeLayouterListener(ILayouterListener layouterListener);
 
    AbstractPositionIterator positionIterator();
}