org.chromium.ui.resources.LayoutResource Java Examples
The following examples show how to use
org.chromium.ui.resources.LayoutResource.
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: StripLayoutTab.java From delion with Apache License 2.0 | 5 votes |
private RectF getCloseRect() { if (!LocalizationUtils.isLayoutRtl()) { mClosePlacement.left = getWidth() - CLOSE_BUTTON_WIDTH_DP; mClosePlacement.right = mClosePlacement.left + CLOSE_BUTTON_WIDTH_DP; } else { mClosePlacement.left = 0; mClosePlacement.right = CLOSE_BUTTON_WIDTH_DP; } mClosePlacement.top = 0; mClosePlacement.bottom = getHeight(); float xOffset = 0; ResourceManager manager = mRenderHost.getResourceManager(); if (manager != null) { LayoutResource resource = manager.getResource(AndroidResourceType.STATIC, getResourceId(false)); if (resource != null) { xOffset = LocalizationUtils.isLayoutRtl() ? resource.getPadding().left : -(resource.getBitmapSize().width() - resource.getPadding().right); } } mClosePlacement.offset(getDrawX() + xOffset, getDrawY()); return mClosePlacement; }
Example #2
Source File: StripLayoutTab.java From AndroidChromium with Apache License 2.0 | 5 votes |
private RectF getCloseRect() { if (!LocalizationUtils.isLayoutRtl()) { mClosePlacement.left = getWidth() - CLOSE_BUTTON_WIDTH_DP; mClosePlacement.right = mClosePlacement.left + CLOSE_BUTTON_WIDTH_DP; } else { mClosePlacement.left = 0; mClosePlacement.right = CLOSE_BUTTON_WIDTH_DP; } mClosePlacement.top = 0; mClosePlacement.bottom = getHeight(); float xOffset = 0; ResourceManager manager = mRenderHost.getResourceManager(); if (manager != null) { LayoutResource resource = manager.getResource(AndroidResourceType.STATIC, getResourceId(false)); if (resource != null) { xOffset = LocalizationUtils.isLayoutRtl() ? resource.getPadding().left : -(resource.getBitmapSize().width() - resource.getPadding().right); } } mClosePlacement.offset(getDrawX() + xOffset, getDrawY()); return mClosePlacement; }
Example #3
Source File: StripLayoutTab.java From 365browser with Apache License 2.0 | 5 votes |
private RectF getCloseRect() { if (!LocalizationUtils.isLayoutRtl()) { mClosePlacement.left = getWidth() - CLOSE_BUTTON_WIDTH_DP; mClosePlacement.right = mClosePlacement.left + CLOSE_BUTTON_WIDTH_DP; } else { mClosePlacement.left = 0; mClosePlacement.right = CLOSE_BUTTON_WIDTH_DP; } mClosePlacement.top = 0; mClosePlacement.bottom = getHeight(); float xOffset = 0; ResourceManager manager = mRenderHost.getResourceManager(); if (manager != null) { LayoutResource resource = manager.getResource(AndroidResourceType.STATIC, getResourceId(false)); if (resource != null) { xOffset = LocalizationUtils.isLayoutRtl() ? resource.getPadding().left : -(resource.getBitmapSize().width() - resource.getPadding().right); } } mClosePlacement.offset(getDrawX() + xOffset, getDrawY()); return mClosePlacement; }