lmw
2025-06-24 27a5170d3aa384c5a3771c2923ef31d0c2c8ad90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.beloo.widget.chipslayoutmanager.layouter.breaker;
 
import com.beloo.widget.chipslayoutmanager.cache.IViewCacheStorage;
import com.beloo.widget.chipslayoutmanager.layouter.AbstractLayouter;
 
class CacheRowBreaker extends RowBreakerDecorator {
 
    private IViewCacheStorage cacheStorage;
 
    CacheRowBreaker(IViewCacheStorage cacheStorage, ILayoutRowBreaker decorate) {
        super(decorate);
        this.cacheStorage = cacheStorage;
    }
 
    @Override
    public boolean isRowBroke(AbstractLayouter al) {
        boolean stopDueToCache = cacheStorage.isPositionEndsRow(al.getCurrentViewPosition());
        return super.isRowBroke(al) || stopDueToCache;
    }
}