ILayoutRender.java
3.93 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*
* Copyright (c) People Technologies Co., Ltd. 2019-2022. All rights reserved.
*/
package com.wd.display.comp.layoutmanager;
import java.util.List;
import androidx.annotation.NonNull;
import com.people.component.comp.layoutdata.AbsPage;
import com.people.component.comp.layoutdata.AbsSection;
import com.people.component.comp.layoutdata.Page;
/**
* Page 布局渲染器, 将comp渲染到页面上
*
* @author wd
*/
public interface ILayoutRender {
/**
* 从startIndex开始有count个item被移除
*
* @param startIndex 移除item范围的开始位置
* @param count 移除item的个数
*/
void itemRangeRemoved(int startIndex, int count);
/**
* 移除置指定的item
* @param positon
*/
void itemRemoved(int positon);
/**
* 依据LayoutManager的 HashCode值删除对应的LayoutManager
* @param hashCode
*/
void itemRemovedByLayoutManagerHashCode(int hashCode);
/**
* 从startIndex开始添加count个item
*
* @param startIndex 添加item范围的开始位置
* @param count 添加item的个数
*/
void itemRangeInserted(int startIndex, int count);
/**
* 从startIndex开始有count个item数据被更新
*
* @param startIndex 更新item范围的开始位置
* @param count 更新item的个数
*/
void itemRangeChanged(int startIndex, int count);
//
// /**
// * 获取在position位置的item对应的ItemLayoutManager
// *
// * @param position adapter position
// */
// ILayoutManager layoutManagerAtPosition(int position);
/**
* 渲染页面
*
* @param page Page实例
*/
void renderPage(AbsPage page,boolean isRefresh);
// /**
// * 渲染overlay浮层
// *
// * @param overlay 浮层实例定义
// */
// void renderOverlay(List<MGOverlay> overlay);
//
// /**
// * 获取从位置start启到end之间的所有布局管理器
// *
// * @param start 启示位置
// * @param end 结束位置
// * @return 从位置start启到end之间的所有布局管理器列表
// */
// List<ILayoutManager> layoutManagerForRange(int start, int end);
//
// /**
// * 获取Page中Item总条数
// *
// * @return
// */
// int getItemCount();
//
/**
* 获取所有comp 的布局管理器
*
* @return list
*/
List<ItemLayoutManager> getAllSectionLayoutManager();
//
//
// void refreshGroup(AbsGroup group, boolean needNotify);
//
// void refreshSection(AbsSection section, boolean needNotify);
//
// /**
// * section中item被删除,并更新section的索引,后续所有section的索引也会被更新
// *
// * @param section 需要更新索引的section
// * @param start 删除item的开始位置, item处在section中的相对位置
// * @param count item删除的个数
// * @param needNotify 申明是否需要通知页面刷新数据
// */
// void sectionItemRemoved(AbsSection section, int start, int count, boolean needNotify);
//
// /**
// * section中添加新的item,并更新section的索引,后续所有section的索引也会被更新
// *
// * @param section 需要更新索引的section
// * @param start 删除item的开始位置, item处在section中的相对位置
// * @param count item删除的个数
// * @param needNotify 申明是否需要通知页面刷新数据
// */
// void sectionItemInserted(AbsSection section, int start, int count, boolean needNotify);
//
/**
* section中添加新的item,并更新section的索引,后续所有section的索引也会被更新
*
* @param section 需要更新索引的section
*/
void sectionItemUpdated(@NonNull AbsSection section);
/**
* notifyDataSetChanged
*/
void notifyDataSetChanged();
void releaseLayoutManagers();
void addBaseLine(Page mPage);
}