@Test public void testScrollTo() throws Exception { WXComponent child = WXDivTest.create(component); ComponentTest.create(child); component.addChild(child); child = WXHeaderTest.create(component); ComponentTest.create(child); component.addChild(child); Map<String, Object> options = new HashMap<>(2); options.put("offset", 10); options.put("animated", false); component.scrollTo(child,options); }
@Override public void addChild(WXComponent child, int index) { super.addChild(child, index); if (child == null || index < -1) { return; } setRefreshOrLoading(child); if(getHostView() != null && hasColumnPros()) { updateRecyclerAttr(); getHostView().getInnerView().initView(getContext(), mLayoutType,mColumnCount,mColumnGap,getOrientation()); } }
WXListComponent extends BasicListComponent<BounceRecyclerView> { @Override public void addChild(WXComponent child, int index) { super.addChild(child, index); if (child == null || index < -1) { return; } setRefreshOrLoading(child); if(getHostView() != null && hasColumnPros()) { updateRecyclerAttr(); getHostView().getInnerView().initView(getContext(), mLayoutType,mColumnCount,mColumnGap,getOrientation()); } } }
WXListComponent extends BasicListComponent<BounceRecyclerView> { @Override public void addChild(WXComponent child, int index) { super.addChild(child, index); if (child == null || index < -1) { return; } setRefreshOrLoading(child); if(getHostView() != null && hasColumnPros()) { updateRecyclerAttr(); getHostView().getInnerView().initView(getContext(), mLayoutType,mColumnCount,mColumnGap,getOrientation()); } } @Deprecated  WXListComponent(WXSDKInstance instance, WXVContainer parent, String instanceId, boolean isLazy, BasicComponentData basicComponentData);  WXListComponent(WXSDKInstance instance, WXVContainer parent, boolean lazy, BasicComponentData basicComponentData); }
WXListComponent extends BasicListComponent<BounceRecyclerView> { @Override public void addChild(WXComponent child, int index) { super.addChild(child, index); if (child == null || index < -1) { return; } setRefreshOrLoading(child); if(getHostView() != null && hasColumnPros()) { updateRecyclerAttr(); getHostView().getInnerView().initView(getContext(), mLayoutType,mColumnCount,mColumnGap,getOrientation()); } } @Deprecated  WXListComponent(WXSDKInstance instance, WXVContainer parent, String instanceId, boolean isLazy, BasicComponentData basicComponentData);  WXListComponent(WXSDKInstance instance, WXVContainer parent, boolean lazy, BasicComponentData basicComponentData); @Override void addChild(WXComponent child, int index); @WXComponentProp(name = Constants.Name.SPAN_OFFSETS) void setSpanOffsets(String spanOffsets); @WXComponentProp(name = Constants.Name.COLUMN_WIDTH) void setColumnWidth(float columnWidth); @WXComponentProp(name = Constants.Name.COLUMN_COUNT) void setColumnCount(int columnCount); @WXComponentProp(name = Constants.Name.COLUMN_GAP) void setColumnGap(float columnGap); @WXComponentProp(name = Constants.Name.SCROLLABLE) void setScrollable(boolean scrollable); @Override void updateProperties(Map<String, Object> props); @Override void createChildViewAt(int index); void remove(WXComponent child, boolean destroy); Float[] getSpanOffsets(); }
WXListComponent extends BasicListComponent<BounceRecyclerView> { @Override public void addChild(WXComponent child, int index) { super.addChild(child, index); if (child == null || index < -1) { return; } setRefreshOrLoading(child); if(getHostView() != null && hasColumnPros()) { updateRecyclerAttr(); getHostView().getInnerView().initView(getContext(), mLayoutType,mColumnCount,mColumnGap,getOrientation()); } } @Deprecated  WXListComponent(WXSDKInstance instance, WXVContainer parent, String instanceId, boolean isLazy, BasicComponentData basicComponentData);  WXListComponent(WXSDKInstance instance, WXVContainer parent, boolean lazy, BasicComponentData basicComponentData); @Override void addChild(WXComponent child, int index); @WXComponentProp(name = Constants.Name.SPAN_OFFSETS) void setSpanOffsets(String spanOffsets); @WXComponentProp(name = Constants.Name.COLUMN_WIDTH) void setColumnWidth(float columnWidth); @WXComponentProp(name = Constants.Name.COLUMN_COUNT) void setColumnCount(int columnCount); @WXComponentProp(name = Constants.Name.COLUMN_GAP) void setColumnGap(float columnGap); @WXComponentProp(name = Constants.Name.SCROLLABLE) void setScrollable(boolean scrollable); @Override void updateProperties(Map<String, Object> props); @Override void createChildViewAt(int index); void remove(WXComponent child, boolean destroy); Float[] getSpanOffsets();  }