本文整理汇总了Java中org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.PanelState.MAXIMIZED属性的典型用法代码示例。如果您正苦于以下问题:Java PanelState.MAXIMIZED属性的具体用法?Java PanelState.MAXIMIZED怎么用?Java PanelState.MAXIMIZED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.PanelState
的用法示例。
在下文中一共展示了PanelState.MAXIMIZED属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePanelForHeight
/**
* Updates the UI state for a given |height|.
*
* @param height The Overlay Panel height.
*/
private void updatePanelForHeight(float height) {
PanelState endState = findLargestPanelStateFromHeight(height);
PanelState startState = getPreviousPanelState(endState);
float percentage = getStateCompletion(height, startState, endState);
updatePanelSize(height);
if (endState == PanelState.CLOSED || endState == PanelState.PEEKED) {
updatePanelForCloseOrPeek(percentage);
} else if (endState == PanelState.EXPANDED) {
updatePanelForExpansion(percentage);
} else if (endState == PanelState.MAXIMIZED) {
updatePanelForMaximization(percentage);
}
}
示例2: getMaximumSupportedState
/**
* @return The maximum state supported by the panel.
*/
private PanelState getMaximumSupportedState() {
if (isSupportedState(PanelState.MAXIMIZED)) {
return PanelState.MAXIMIZED;
} else if (isSupportedState(PanelState.EXPANDED)) {
return PanelState.EXPANDED;
} else {
return PanelState.PEEKED;
}
}
示例3: getPanelHeightFromState
/**
* Gets the height of the Overlay Panel in dps for a given |state|.
*
* @param state The state whose height will be calculated.
* @return The height of the Overlay Panel in dps for a given |state|.
*/
public float getPanelHeightFromState(PanelState state) {
if (state == PanelState.PEEKED) {
return getPeekedHeight();
} else if (state == PanelState.EXPANDED) {
return getExpandedHeight();
} else if (state == PanelState.MAXIMIZED) {
return getMaximizedHeight();
}
return 0;
}