本文整理汇总了Java中org.chromium.content.browser.DeviceUtils.isTablet方法的典型用法代码示例。如果您正苦于以下问题:Java DeviceUtils.isTablet方法的具体用法?Java DeviceUtils.isTablet怎么用?Java DeviceUtils.isTablet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.chromium.content.browser.DeviceUtils
的用法示例。
在下文中一共展示了DeviceUtils.isTablet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: InfoBarContainer
import org.chromium.content.browser.DeviceUtils; //导入方法依赖的package包/类
public InfoBarContainer(Activity activity, AutoLoginProcessor autoLoginProcessor,
int tabId, ViewGroup parentView, int nativeWebContents) {
super(activity);
setOrientation(LinearLayout.VERTICAL);
mAnimationListener = null;
mInfoBarTransitions = new ArrayDeque<InfoBarTransitionInfo>();
mAutoLoginDelegate = new AutoLoginDelegate(autoLoginProcessor, activity);
mActivity = activity;
mTabId = tabId;
mParentView = parentView;
mAnimationSizer = new FrameLayout(activity);
mAnimationSizer.setVisibility(INVISIBLE);
// The tablet has the infobars below the location bar. On the phone they are at the bottom.
mInfoBarsOnTop = DeviceUtils.isTablet(activity);
setGravity(determineGravity());
// Chromium's InfoBarContainer may add an InfoBar immediately during this initialization
// call, so make sure everything in the InfoBarContainer is completely ready beforehand.
mNativeInfoBarContainer = nativeInit(nativeWebContents, mAutoLoginDelegate);
}
示例2: needsAlwaysPanel
import org.chromium.content.browser.DeviceUtils; //导入方法依赖的package包/类
private boolean needsAlwaysPanel() {
return (getInfoBarType() == TranslateInfoBar.AFTER_TRANSLATE_INFOBAR
&& mOptions.alwaysTranslateLanguageState() && !DeviceUtils.isTablet(getContext()));
}