Java Code Examples for com.taobao.weex.utils.WXUtils#getInt()
The following examples show how to use
com.taobao.weex.utils.WXUtils#getInt() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WXStyle.java From ucar-weex-core with Apache License 2.0 | 5 votes |
public static int getFontSize(Map<String, Object> style,int viewPortW) { if (style == null) { return (int) WXViewUtils.getRealPxByWidth(WXText.sDEFAULT_SIZE,viewPortW); } int fontSize = WXUtils.getInt(style.get(Constants.Name.FONT_SIZE)); if (fontSize <= 0) { fontSize = WXText.sDEFAULT_SIZE; } return (int) WXViewUtils.getRealPxByWidth(fontSize,viewPortW); }
Example 2
Source File: WXStyle.java From ucar-weex-core with Apache License 2.0 | 5 votes |
public static int getLineHeight(Map<String, Object> style,int viewPortW){ if (style == null) { return UNSET; } int lineHeight = WXUtils.getInt(style.get(Constants.Name.LINE_HEIGHT)); if (lineHeight <= 0) { lineHeight = UNSET; return lineHeight; } return (int) WXViewUtils.getRealPxByWidth(lineHeight,viewPortW); }
Example 3
Source File: WXStyle.java From ucar-weex-core with Apache License 2.0 | 5 votes |
public int getTimeFontSize() { int fontSize = WXUtils.getInt(get("timeFontSize")); if (fontSize <= 0) { fontSize = WXText.sDEFAULT_SIZE; } return fontSize; }
Example 4
Source File: WXStyle.java From weex-uikit with MIT License | 5 votes |
public static int getFontSize(Map<String, Object> style,int viewPortW) { if (style == null) { return (int) WXViewUtils.getRealPxByWidth(WXText.sDEFAULT_SIZE,viewPortW); } int fontSize = WXUtils.getInt(style.get(Constants.Name.FONT_SIZE)); if (fontSize <= 0) { fontSize = WXText.sDEFAULT_SIZE; } return (int) WXViewUtils.getRealPxByWidth(fontSize,viewPortW); }
Example 5
Source File: WXStyle.java From weex-uikit with MIT License | 5 votes |
public static int getLineHeight(Map<String, Object> style,int viewPortW){ if (style == null) { return UNSET; } int lineHeight = WXUtils.getInt(style.get(Constants.Name.LINE_HEIGHT)); if (lineHeight <= 0) { lineHeight = UNSET; return lineHeight; } return (int) WXViewUtils.getRealPxByWidth(lineHeight,viewPortW); }
Example 6
Source File: WXStyle.java From weex-uikit with MIT License | 5 votes |
public int getTimeFontSize() { int fontSize = WXUtils.getInt(get("timeFontSize")); if (fontSize <= 0) { fontSize = WXText.sDEFAULT_SIZE; } return fontSize; }
Example 7
Source File: WXStyle.java From weex with Apache License 2.0 | 5 votes |
public static int getFontSize(Map<String, Object> style) { if (style == null) { return (int) WXViewUtils.getRealPxByWidth(WXText.sDEFAULT_SIZE); } int fontSize = WXUtils.getInt(style.get(WXDomPropConstant.WX_FONTSIZE)); if (fontSize <= 0) { fontSize = WXText.sDEFAULT_SIZE; } return (int) WXViewUtils.getRealPxByWidth(fontSize); }
Example 8
Source File: WXStyle.java From weex with Apache License 2.0 | 5 votes |
public static int getLineHeight(Map<String, Object> style){ if (style == null) { return UNSET; } int lineHeight = WXUtils.getInt(style.get(WXDomPropConstant.WX_TEXT_LINE_HEIGHT)); if (lineHeight <= 0) { lineHeight = UNSET; return lineHeight; } return (int) WXViewUtils.getRealPxByWidth(lineHeight); }
Example 9
Source File: WXStyle.java From weex with Apache License 2.0 | 5 votes |
public int getTimeFontSize() { int fontSize = WXUtils.getInt(get("timeFontSize")); if (fontSize <= 0) { fontSize = WXText.sDEFAULT_SIZE; } return fontSize; }
Example 10
Source File: WXStyle.java From ucar-weex-core with Apache License 2.0 | 4 votes |
public static int getLines(Map<String, Object> style) { return WXUtils.getInt(style.get(Constants.Name.LINES)); }
Example 11
Source File: WXStyle.java From weex-uikit with MIT License | 4 votes |
public static int getLines(Map<String, Object> style) { return WXUtils.getInt(style.get(Constants.Name.LINES)); }
Example 12
Source File: WXStyle.java From weex with Apache License 2.0 | 4 votes |
public static int getLines(Map<String, Object> style) { return WXUtils.getInt(style.get(WXDomPropConstant.WX_LINES)); }