use of com.taobao.weex.ui.component.Scrollable in project weex-example by KalicyZhou.
the class WXStickyHelper method unbindStickStyle.
public void unbindStickStyle(WXComponent component, Map<String, HashMap<String, WXComponent>> mStickyMap) {
Scrollable scroller = component.getParentScroller();
if (scroller == null) {
return;
}
HashMap<String, WXComponent> stickyMap = mStickyMap.get(scroller.getRef());
if (stickyMap == null) {
return;
}
stickyMap.remove(component.getRef());
}
use of com.taobao.weex.ui.component.Scrollable in project weex-example by KalicyZhou.
the class WXStickyHelper method bindStickStyle.
public void bindStickStyle(WXComponent component, Map<String, HashMap<String, WXComponent>> mStickyMap) {
Scrollable scroller = component.getParentScroller();
if (scroller == null) {
return;
}
HashMap<String, WXComponent> stickyMap = mStickyMap.get(scroller.getRef());
if (stickyMap == null) {
stickyMap = new HashMap<>();
}
if (stickyMap.containsKey(component.getRef())) {
return;
}
stickyMap.put(component.getRef(), component);
mStickyMap.put(scroller.getRef(), stickyMap);
}
use of com.taobao.weex.ui.component.Scrollable in project weex-example by KalicyZhou.
the class WXRenderStatement method scrollTo.
/**
* @see com.taobao.weex.dom.WXDomStatement#scrollToDom(String, JSONObject)
*/
void scrollTo(String ref, Map<String, Object> options) {
WXComponent component = mRegistry.get(ref);
if (component == null) {
return;
}
Scrollable scroller = component.getParentScroller();
if (scroller == null) {
return;
}
scroller.scrollTo(component, options);
}
Aggregations