android: fix when flowlayout not set loadMoreView will crash
This commit is contained in:
parent
9757a6e8c6
commit
53452e1d53
@ -62,7 +62,7 @@ class FlowAdapter extends RecyclerView.Adapter<FlowAdapter.DoricViewHolder> {
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull DoricViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull DoricViewHolder holder, int position) {
|
||||||
JSValue jsValue = getItemModel(position);
|
JSValue jsValue = getItemModel(position);
|
||||||
if (jsValue.isObject()) {
|
if (jsValue != null && jsValue.isObject()) {
|
||||||
JSObject jsObject = jsValue.asObject();
|
JSObject jsObject = jsValue.asObject();
|
||||||
holder.flowLayoutItemNode.setId(jsObject.getProperty("id").asString().value());
|
holder.flowLayoutItemNode.setId(jsObject.getProperty("id").asString().value());
|
||||||
holder.flowLayoutItemNode.blend(jsObject.getProperty("props").asObject());
|
holder.flowLayoutItemNode.blend(jsObject.getProperty("props").asObject());
|
||||||
|
Reference in New Issue
Block a user