本文整理汇总了Java中com.taobao.weex.utils.WXViewUtils类的典型用法代码示例。如果您正苦于以下问题:Java WXViewUtils类的具体用法?Java WXViewUtils怎么用?Java WXViewUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WXViewUtils类属于com.taobao.weex.utils包,在下文中一共展示了WXViewUtils类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: assembleDefaultOptions
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
private WXParams assembleDefaultOptions() {
Map<String, String> config = WXEnvironment.getConfig();
WXParams wxParams = new WXParams();
wxParams.setPlatform(config.get("os"));
wxParams.setOsVersion(config.get("sysVersion"));
wxParams.setAppVersion(config.get("appVersion"));
wxParams.setWeexVersion(config.get("weexVersion"));
wxParams.setDeviceModel(config.get("sysModel"));
wxParams.setShouldInfoCollect(config.get("infoCollect"));
wxParams.setLogLevel(config.get(WXConfig.logLevel));
String appName = config.get("appName");
if (!TextUtils.isEmpty(appName)) {
wxParams.setAppName(appName);
}
wxParams.setDeviceWidth(TextUtils.isEmpty(config.get("deviceWidth")) ? String.valueOf(WXViewUtils.getScreenWidth(WXEnvironment.sApplication)) : config.get("deviceWidth"));
wxParams.setDeviceHeight(TextUtils.isEmpty(config.get("deviceHeight")) ? String.valueOf(WXViewUtils.getScreenHeight(WXEnvironment.sApplication)) : config.get("deviceHeight"));
return wxParams;
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:19,代码来源:WXBridgeManager.java
示例2: setBorderRadius
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
public void setBorderRadius(String key, float borderRadius) {
if (borderRadius >= 0) {
switch (key) {
case Constants.Name.BORDER_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_RADIUS_ALL, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getViewPortWidth()));
break;
case Constants.Name.BORDER_TOP_LEFT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_TOP_LEFT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getViewPortWidth()));
break;
case Constants.Name.BORDER_TOP_RIGHT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_TOP_RIGHT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getViewPortWidth()));
break;
case Constants.Name.BORDER_BOTTOM_RIGHT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_BOTTOM_RIGHT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getViewPortWidth()));
break;
case Constants.Name.BORDER_BOTTOM_LEFT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_BOTTOM_LEFT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getViewPortWidth()));
break;
}
}
}
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:22,代码来源:WXComponent.java
示例3: draw
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
@Override
public void draw(Canvas canvas) {
canvas.save();
updateBorderOutline();
if (mPathForBorderOutline != null) {
int useColor = WXViewUtils.multiplyColorAlpha(mColor, mAlpha);
if ((useColor >>> 24) != 0) {
mPaint.setStyle(Paint.Style.FILL);
mPaint.setColor(useColor);
mPaint.setShader(null);
canvas.drawPath(mPathForBorderOutline, mPaint);
}
}
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeJoin(Paint.Join.ROUND);
drawBorders(canvas);
mPaint.setShader(null);
canvas.restore();
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:20,代码来源:BorderDrawable.java
示例4: scrollTo
import com.taobao.weex.utils.WXViewUtils; //导入依赖的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);
}
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:28,代码来源:WXRenderStatement.java
示例5: scrollTo
import com.taobao.weex.utils.WXViewUtils; //导入依赖的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);
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:28,代码来源:WXRenderStatement.java
示例6: measure
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
@Override
protected MeasureOutput measure(int width, int height) {
MeasureOutput measureOutput = new MeasureOutput();
if (this.mOrientation == Constants.Orientation.HORIZONTAL) {
int screenW = WXViewUtils.getScreenWidth(WXEnvironment.sApplication);
int weexW = WXViewUtils.getWeexWidth(getInstanceId());
measureOutput.width = width > (weexW >= screenW ? screenW : weexW) ? FrameLayout.LayoutParams.MATCH_PARENT
: width;
measureOutput.height = height;
} else {
int screenH = WXViewUtils.getScreenHeight(WXEnvironment.sApplication);
int weexH = WXViewUtils.getWeexHeight(getInstanceId());
measureOutput.height = height > (weexH >= screenH ? screenH : weexH) ? FrameLayout.LayoutParams.MATCH_PARENT
: height;
measureOutput.width = width;
}
return measureOutput;
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:19,代码来源:WXScroller.java
示例7: setBorderRadius
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
public void setBorderRadius(String key, float borderRadius) {
if (borderRadius >= 0) {
switch (key) {
case Constants.Name.BORDER_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_RADIUS_ALL, WXViewUtils.getRealSubPxByWidth(borderRadius));
break;
case Constants.Name.BORDER_TOP_LEFT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_TOP_LEFT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius));
break;
case Constants.Name.BORDER_TOP_RIGHT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_TOP_RIGHT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius));
break;
case Constants.Name.BORDER_BOTTOM_RIGHT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_BOTTOM_RIGHT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius));
break;
case Constants.Name.BORDER_BOTTOM_LEFT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_BOTTOM_LEFT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius));
break;
}
}
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:22,代码来源:WXComponent.java
示例8: setBorderWidth
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
public void setBorderWidth(String key, float borderWidth) {
if (borderWidth >= 0) {
switch (key) {
case Constants.Name.BORDER_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.ALL, WXViewUtils.getRealSubPxByWidth(borderWidth));
break;
case Constants.Name.BORDER_TOP_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.TOP, WXViewUtils.getRealSubPxByWidth(borderWidth));
break;
case Constants.Name.BORDER_RIGHT_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.RIGHT, WXViewUtils.getRealSubPxByWidth(borderWidth));
break;
case Constants.Name.BORDER_BOTTOM_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.BOTTOM, WXViewUtils.getRealSubPxByWidth(borderWidth));
break;
case Constants.Name.BORDER_LEFT_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.LEFT, WXViewUtils.getRealSubPxByWidth(borderWidth));
break;
}
}
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:22,代码来源:WXComponent.java
示例9: makeTitleView
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
private TextView makeTitleView(Context context, Map<String, Object> options) {
String text = getOption(options, KEY_TITLE, null);
if (text == null) {
return null;
}
TextView textView = new TextView(context);
textView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20);
int padding = WXViewUtils.dip2px(12);
textView.setPadding(padding, padding, padding, padding);
textView.getPaint().setFakeBoldText(true);
textView.setBackgroundColor(getColor(options, KEY_TITLE_BACKGROUND_COLOR, Color.TRANSPARENT));
textView.setTextColor(getColor(options, KEY_TITLE_COLOR, Color.BLACK));
textView.setText(text);
return textView;
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:17,代码来源:WXPickersModule.java
示例10: draw
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
@Override
public void draw(@NonNull Canvas canvas) {
canvas.save();
updateBorderOutline();
//Shader uses alpha as well.
mPaint.setAlpha(255);
if (mPathForBorderOutline != null) {
int useColor = WXViewUtils.multiplyColorAlpha(mColor, mAlpha);
if (mShader != null) {
mPaint.setShader(mShader);
mPaint.setStyle(Paint.Style.FILL);
canvas.drawPath(mPathForBorderOutline, mPaint);
mPaint.setShader(null);
} else if ((useColor >>> 24) != 0) {
mPaint.setColor(useColor);
mPaint.setStyle(Paint.Style.FILL);
canvas.drawPath(mPathForBorderOutline, mPaint);
mPaint.setShader(null);
}
}
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeJoin(Paint.Join.ROUND);
drawBorders(canvas);
mPaint.setShader(null);
canvas.restore();
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:27,代码来源:BorderDrawable.java
示例11: fireScrollEvent
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
private void fireScrollEvent(Rect contentFrame, int x, int y, int oldx, int oldy) {
Map<String, Object> event = new HashMap<>(2);
Map<String, Object> contentSize = new HashMap<>(2);
Map<String, Object> contentOffset = new HashMap<>(2);
int viewport = getInstance().getInstanceViewPortWidth();
contentSize.put(Constants.Name.WIDTH, WXViewUtils.getWebPxByWidth(contentFrame.width(), viewport));
contentSize.put(Constants.Name.HEIGHT, WXViewUtils.getWebPxByWidth(contentFrame.height(), viewport));
contentOffset.put(Constants.Name.X, -WXViewUtils.getWebPxByWidth(x, viewport));
contentOffset.put(Constants.Name.Y, -WXViewUtils.getWebPxByWidth(y, viewport));
event.put(Constants.Name.CONTENT_SIZE, contentSize);
event.put(Constants.Name.CONTENT_OFFSET, contentOffset);
fireEvent(Constants.Event.SCROLL, event);
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:19,代码来源:WXScroller.java
示例12: scrollTo
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
@Override
public void scrollTo(WXComponent component, Map<String, Object> options) {
float offsetFloat = 0;
boolean smooth = true;
if (options != null) {
String offset = options.get(Constants.Name.OFFSET) == null ? "0" : options.get(Constants.Name.OFFSET).toString();
smooth = WXUtils.getBoolean(options.get(Constants.Name.ANIMATED), true);
if (offset != null) {
try {
offsetFloat = WXViewUtils.getRealPxByWidth(Float.parseFloat(offset), getInstance().getInstanceViewPortWidth());
}catch (Exception e ){
WXLogUtils.e("Float parseFloat error :"+e.getMessage());
}
}
}
int viewYInScroller=component.getAbsoluteY() - getAbsoluteY();
int viewXInScroller=component.getAbsoluteX() - getAbsoluteX();
scrollBy(viewXInScroller - getScrollX() + (int) offsetFloat, viewYInScroller - getScrollY() + (int) offsetFloat, smooth);
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:23,代码来源:WXScroller.java
示例13: setBorderWidth
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
public void setBorderWidth(String key, float borderWidth) {
if (borderWidth >= 0) {
switch (key) {
case Constants.Name.BORDER_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.ALL, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getViewPortWidth()));
break;
case Constants.Name.BORDER_TOP_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.TOP, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getViewPortWidth()));
break;
case Constants.Name.BORDER_RIGHT_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.RIGHT, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getViewPortWidth()));
break;
case Constants.Name.BORDER_BOTTOM_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.BOTTOM, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getViewPortWidth()));
break;
case Constants.Name.BORDER_LEFT_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.LEFT, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getViewPortWidth()));
break;
}
}
}
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:22,代码来源:WXComponent.java
示例14: createViewImpl
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
protected void createViewImpl() {
if (mContext != null) {
mHost = initComponentHostView(mContext);
if (mHost == null && !isVirtualComponent()) {
//compatible
initView();
}
if(mHost != null){
mHost.setId(WXViewUtils.generateViewId());
ComponentObserver observer;
if ((observer = getInstance().getComponentObserver()) != null) {
observer.onViewCreated(this, mHost);
}
}
onHostViewInitialized(mHost);
}else{
WXLogUtils.e("createViewImpl","Context is null");
}
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:20,代码来源:WXComponent.java
示例15: setBorderRadius
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
public void setBorderRadius(String key, float borderRadius) {
if (borderRadius >= 0) {
switch (key) {
case Constants.Name.BORDER_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_RADIUS_ALL, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getInstanceViewPortWidth()));
break;
case Constants.Name.BORDER_TOP_LEFT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_TOP_LEFT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getInstanceViewPortWidth()));
break;
case Constants.Name.BORDER_TOP_RIGHT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_TOP_RIGHT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getInstanceViewPortWidth()));
break;
case Constants.Name.BORDER_BOTTOM_RIGHT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_BOTTOM_RIGHT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getInstanceViewPortWidth()));
break;
case Constants.Name.BORDER_BOTTOM_LEFT_RADIUS:
getOrCreateBorder().setBorderRadius(BorderDrawable.BORDER_BOTTOM_LEFT_RADIUS, WXViewUtils.getRealSubPxByWidth(borderRadius,mInstance.getInstanceViewPortWidth()));
break;
}
}
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:22,代码来源:WXComponent.java
示例16: setBorderWidth
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
public void setBorderWidth(String key, float borderWidth) {
if (borderWidth >= 0) {
switch (key) {
case Constants.Name.BORDER_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.ALL, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getInstanceViewPortWidth()));
break;
case Constants.Name.BORDER_TOP_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.TOP, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getInstanceViewPortWidth()));
break;
case Constants.Name.BORDER_RIGHT_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.RIGHT, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getInstanceViewPortWidth()));
break;
case Constants.Name.BORDER_BOTTOM_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.BOTTOM, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getInstanceViewPortWidth()));
break;
case Constants.Name.BORDER_LEFT_WIDTH:
getOrCreateBorder().setBorderWidth(Spacing.LEFT, WXViewUtils.getRealSubPxByWidth(borderWidth,getInstance().getInstanceViewPortWidth()));
break;
}
}
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:22,代码来源:WXComponent.java
示例17: notifyNativeSizeChanged
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
/**
* Trigger a updateStyle invoke to relayout current page
*/
public void notifyNativeSizeChanged(int w, int h) {
if (!mNeedLayoutOnAnimation) {
return;
}
Message message = Message.obtain();
WXDomTask task = new WXDomTask();
task.instanceId = getInstanceId();
if (task.args == null) {
task.args = new ArrayList<>();
}
JSONObject style = new JSONObject(2);
float webW = WXViewUtils.getWebPxByWidth(w);
float webH = WXViewUtils.getWebPxByWidth(h);
style.put("width", webW);
style.put("height", webH);
task.args.add(getRef());
task.args.add(style);
message.obj = task;
message.what = WXDomHandler.MsgType.WX_DOM_UPDATE_STYLE;
WXSDKManager.getInstance().getWXDomManager().sendMessage(message);
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:29,代码来源:WXComponent.java
示例18: onLoadMore
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
@Override
public void onLoadMore(int offScreenY) {
try {
String offset = getDomObject().getAttrs().getLoadMoreOffset();
if (TextUtils.isEmpty(offset)) {
offset = "0";
}
float offsetParsed = WXViewUtils.getRealPxByWidth(Integer.parseInt(offset),getInstance().getInstanceViewPortWidth());
if (offScreenY < offsetParsed) {
if (mListCellCount != mChildren.size()
|| mForceLoadmoreNextTime) {
fireEvent(Constants.Event.LOADMORE);
mListCellCount = mChildren.size();
mForceLoadmoreNextTime = false;
}
}
} catch (Exception e) {
WXLogUtils.d(TAG + "onLoadMore :", e);
}
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:24,代码来源:BasicListComponent.java
示例19: fireScrollEvent
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
private void fireScrollEvent(RecyclerView recyclerView, int offsetX, int offsetY) {
int contentWidth = recyclerView.getMeasuredWidth() + recyclerView.computeHorizontalScrollRange();
int contentHeight = recyclerView.computeVerticalScrollRange();
Map<String, Object> event = new HashMap<>(2);
Map<String, Object> contentSize = new HashMap<>(2);
Map<String, Object> contentOffset = new HashMap<>(2);
contentSize.put(Constants.Name.WIDTH, WXViewUtils.getWebPxByWidth(contentWidth, getInstance().getInstanceViewPortWidth()));
contentSize.put(Constants.Name.HEIGHT, WXViewUtils.getWebPxByWidth(contentHeight, getInstance().getInstanceViewPortWidth()));
contentOffset.put(Constants.Name.X, - WXViewUtils.getWebPxByWidth(offsetX, getInstance().getInstanceViewPortWidth()));
contentOffset.put(Constants.Name.Y, - WXViewUtils.getWebPxByWidth(offsetY, getInstance().getInstanceViewPortWidth()));
event.put(Constants.Name.CONTENT_SIZE, contentSize);
event.put(Constants.Name.CONTENT_OFFSET, contentOffset);
fireEvent(Constants.Event.SCROLL, event);
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:19,代码来源:BasicListComponent.java
示例20: assembleDefaultOptions
import com.taobao.weex.utils.WXViewUtils; //导入依赖的package包/类
private WXParams assembleDefaultOptions() {
Map<String, String> config = WXEnvironment.getConfig();
WXParams wxParams = new WXParams();
wxParams.setPlatform(config.get("os"));
wxParams.setOsVersion(config.get("sysVersion"));
wxParams.setAppVersion(config.get("appVersion"));
wxParams.setWeexVersion(config.get("weexVersion"));
wxParams.setDeviceModel(config.get("sysModel"));
wxParams.setShouldInfoCollect(config.get("infoCollect"));
wxParams.setLogLevel(config.get(WXConfig.logLevel));
String appName = config.get("appName");
if (!TextUtils.isEmpty(appName)) {
wxParams.setAppName(appName);
}
wxParams.setDeviceWidth(TextUtils.isEmpty(config.get("deviceWidth")) ? String.valueOf(WXViewUtils.getScreenWidth(WXEnvironment.sApplication)) : config.get("deviceWidth"));
wxParams.setDeviceHeight(TextUtils.isEmpty(config.get("deviceHeight")) ? String.valueOf(WXViewUtils.getScreenHeight(WXEnvironment.sApplication)) : config.get("deviceHeight"));
wxParams.setOptions(WXEnvironment.getCustomOptions());
return wxParams;
}
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:20,代码来源:WXBridgeManager.java
注:本文中的com.taobao.weex.utils.WXViewUtils类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论