use of com.taobao.weex.ui.component.list.template.CellRenderContext in project incubator-weex by apache.
the class StatementTest method createContext.
private CellRenderContext createContext(int count) {
JSONObject data = new JSONObject();
data.put("item", new JSONObject());
data.getJSONObject("item").put("name", "hello world");
List<String> datas = new ArrayList<>();
for (int i = 0; i < count; i++) {
datas.add("hello" + count);
}
data.getJSONObject("item").put("list", datas);
data.put("dataList", datas);
ArrayStack context = new ArrayStack();
context.push(data);
CellRenderContext cellRenderContext = new CellRenderContext();
cellRenderContext.stack = context;
return cellRenderContext;
}
Aggregations