Flowlayout's loadMoreView supports fullSpan,default is false
This commit is contained in:
@@ -67,9 +67,11 @@ class FlowAdapter extends RecyclerView.Adapter<FlowAdapter.DoricViewHolder> {
|
||||
holder.flowLayoutItemNode.setId(jsObject.getProperty("id").asString().value());
|
||||
holder.flowLayoutItemNode.blend(jsObject.getProperty("props").asObject());
|
||||
}
|
||||
if (holder.flowLayoutItemNode.fullSpan
|
||||
|| this.flowLayoutNode.loadMore
|
||||
&& position >= this.itemCount) {
|
||||
boolean fullSpan = this.flowLayoutNode.loadMore && position >= this.itemCount;
|
||||
if (holder.flowLayoutItemNode.fullSpan != null) {
|
||||
fullSpan = holder.flowLayoutItemNode.fullSpan;
|
||||
}
|
||||
if (fullSpan) {
|
||||
StaggeredGridLayoutManager.LayoutParams layoutParams = new StaggeredGridLayoutManager.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
holder.itemView.getLayoutParams().height
|
||||
|
@@ -32,7 +32,7 @@ import pub.doric.shader.StackNode;
|
||||
@DoricPlugin(name = "FlowLayoutItem")
|
||||
public class FlowLayoutItemNode extends StackNode {
|
||||
public String identifier = "";
|
||||
public boolean fullSpan = false;
|
||||
public Boolean fullSpan = null;
|
||||
|
||||
public FlowLayoutItemNode(DoricContext doricContext) {
|
||||
super(doricContext);
|
||||
|
@@ -104,9 +104,6 @@ public class FlowLayoutNode extends SuperNode<RecyclerView> implements IDoricScr
|
||||
private int itemCount = 0;
|
||||
private boolean scrollable = true;
|
||||
|
||||
String headerViewId;
|
||||
String footerViewId;
|
||||
|
||||
public FlowLayoutNode(DoricContext doricContext) {
|
||||
super(doricContext);
|
||||
this.flowAdapter = new FlowAdapter(this);
|
||||
@@ -214,12 +211,6 @@ public class FlowLayoutNode extends SuperNode<RecyclerView> implements IDoricScr
|
||||
}
|
||||
this.onScrollEndFuncId = prop.asString().value();
|
||||
break;
|
||||
case "header":
|
||||
this.headerViewId = prop.asString().value();
|
||||
break;
|
||||
case "footer":
|
||||
this.footerViewId = prop.asString().value();
|
||||
break;
|
||||
default:
|
||||
super.blend(view, name, prop);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user