FlowLayoutItem add fullSpan attribute
This commit is contained in:
@@ -69,7 +69,8 @@ class FlowAdapter extends RecyclerView.Adapter<FlowAdapter.DoricViewHolder> {
|
||||
holder.flowLayoutItemNode.setId(jsObject.getProperty("id").asString().value());
|
||||
holder.flowLayoutItemNode.blend(jsObject.getProperty("props").asObject());
|
||||
}
|
||||
if ((this.flowLayoutNode.hasHeader() && position == 0)
|
||||
if (holder.flowLayoutItemNode.fullSpan
|
||||
|| (this.flowLayoutNode.hasHeader() && position == 0)
|
||||
|| (this.flowLayoutNode.hasFooter() && position == this.getItemCount() - 1)
|
||||
|| this.flowLayoutNode.loadMore
|
||||
&& position == this.itemCount + (this.flowLayoutNode.hasHeader() ? 1 : 0)) {
|
||||
|
@@ -32,6 +32,7 @@ import pub.doric.shader.StackNode;
|
||||
@DoricPlugin(name = "FlowLayoutItem")
|
||||
public class FlowLayoutItemNode extends StackNode {
|
||||
public String identifier = "";
|
||||
public boolean fullSpan = false;
|
||||
|
||||
public FlowLayoutItemNode(DoricContext doricContext) {
|
||||
super(doricContext);
|
||||
@@ -42,6 +43,8 @@ public class FlowLayoutItemNode extends StackNode {
|
||||
protected void blend(FrameLayout view, String name, JSValue prop) {
|
||||
if ("identifier".equals(name)) {
|
||||
this.identifier = prop.asString().value();
|
||||
} else if ("fullSpan".equals(name)) {
|
||||
this.fullSpan = prop.asBoolean().value();
|
||||
} else {
|
||||
super.blend(view, name, prop);
|
||||
}
|
||||
|
Reference in New Issue
Block a user