本文整理汇总了Java中com.taobao.weex.ui.component.WXComponent.getParentScroller方法的典型用法代码示例。如果您正苦于以下问题:Java WXComponent.getParentScroller方法的具体用法?Java WXComponent.getParentScroller怎么用?Java WXComponent.getParentScroller使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.taobao.weex.ui.component.WXComponent
的用法示例。
在下文中一共展示了WXComponent.getParentScroller方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scrollTo
import com.taobao.weex.ui.component.WXComponent; //导入方法依赖的package包/类
/**
* @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;
}
float offsetFloat = 0;
if (options != null) {
String offset = options.get("offset") == null ? "0" : options.get("offset").toString();
if (offset != null) {
try {
offsetFloat = WXViewUtils.getRealPxByWidth(Float.parseFloat(offset));
}catch (Exception e ){
WXLogUtils.e("Float parseFloat error :"+e.getMessage());
}
}
}
Scrollable scroller = component.getParentScroller();
if (scroller == null) {
return;
}
scroller.scrollTo(component,(int)offsetFloat);
}
示例2: bindStickStyle
import com.taobao.weex.ui.component.WXComponent; //导入方法依赖的package包/类
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);
}
示例3: bindStickStyle
import com.taobao.weex.ui.component.WXComponent; //导入方法依赖的package包/类
public void bindStickStyle(WXComponent component, Map<String, Map<String, WXComponent>> mStickyMap) {
Scrollable scroller = component.getParentScroller();
if (scroller == null) {
return;
}
Map<String, WXComponent> stickyMap = mStickyMap.get(scroller
.getRef());
if (stickyMap == null) {
stickyMap = new ConcurrentHashMap<>();
}
if (stickyMap.containsKey(component.getRef())) {
return;
}
stickyMap.put(component.getRef(), component);
mStickyMap.put(scroller.getRef(), stickyMap);
}
示例4: scrollTo
import com.taobao.weex.ui.component.WXComponent; //导入方法依赖的package包/类
/**
* @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;
}
float offsetFloat = 0;
if (options != null) {
String offset = options.get("offset") == null ? "0" : options.get("offset").toString();
if (offset != null) {
try {
offsetFloat = WXViewUtils.getRealPxByWidth(Float.parseFloat(offset),mWXSDKInstance.getViewPortWidth());
}catch (Exception e ){
WXLogUtils.e("Float parseFloat error :"+e.getMessage());
}
}
}
Scrollable scroller = component.getParentScroller();
if (scroller == null) {
return;
}
scroller.scrollTo(component,(int)offsetFloat);
}
示例5: unbindStickStyle
import com.taobao.weex.ui.component.WXComponent; //导入方法依赖的package包/类
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());
}
示例6: executeRender
import com.taobao.weex.ui.component.WXComponent; //导入方法依赖的package包/类
@Override
public void executeRender(RenderActionContext context) {
WXComponent component = context.getComponent(mRef);
if (component == null) {
return;
}
Scrollable scroller = component.getParentScroller();
if (scroller == null) {
return;
}
scroller.scrollTo(component,mOptions);
}
示例7: WXGesture
import com.taobao.weex.ui.component.WXComponent; //导入方法依赖的package包/类
public WXGesture(WXComponent wxComponent, Context context) {
this.component = wxComponent;
globalRect = new Rect();
globalOffset = new Point();
globalEventOffset = new Point();
locEventOffset = new PointF();
locLeftTop = new PointF();
mGestureDetector = new GestureDetector(context, this, new GestureHandler());
Scrollable parentScrollable = wxComponent.getParentScroller();
if(parentScrollable != null) {
mParentOrientation = parentScrollable.getOrientation();
}
}
示例8: unbindStickStyle
import com.taobao.weex.ui.component.WXComponent; //导入方法依赖的package包/类
public void unbindStickStyle(WXComponent component, Map<String, Map<String, WXComponent>> mStickyMap) {
Scrollable scroller = component.getParentScroller();
if (scroller == null) {
return;
}
Map<String, WXComponent> stickyMap = mStickyMap.get(scroller
.getRef());
if (stickyMap == null) {
return;
}
stickyMap.remove(component.getRef());
}