當前位置: 首頁>>代碼示例>>Java>>正文


Java Configuration.SCREENLAYOUT_SIZE_XLARGE屬性代碼示例

本文整理匯總了Java中android.content.res.Configuration.SCREENLAYOUT_SIZE_XLARGE屬性的典型用法代碼示例。如果您正苦於以下問題:Java Configuration.SCREENLAYOUT_SIZE_XLARGE屬性的具體用法?Java Configuration.SCREENLAYOUT_SIZE_XLARGE怎麽用?Java Configuration.SCREENLAYOUT_SIZE_XLARGE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在android.content.res.Configuration的用法示例。


在下文中一共展示了Configuration.SCREENLAYOUT_SIZE_XLARGE屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: checkScreenSize

public void checkScreenSize() {

        int screenSize = getResources().getConfiguration().screenLayout &
                Configuration.SCREENLAYOUT_SIZE_MASK;

        switch (screenSize) {
            case Configuration.SCREENLAYOUT_SIZE_XLARGE:

                column_no = 4;
                break;
            case Configuration.SCREENLAYOUT_SIZE_UNDEFINED:
                column_no = 3;
                break;
            case Configuration.SCREENLAYOUT_SIZE_LARGE:
                column_no = 3;
                break;
            case Configuration.SCREENLAYOUT_SIZE_NORMAL:
                column_no = 2;
                break;
            case Configuration.SCREENLAYOUT_SIZE_SMALL:
                column_no = 2;
                break;
            default:
                column_no = 2;
        }
    }
 
開發者ID:MuditSrivastava,項目名稱:Canvas-Vision,代碼行數:26,代碼來源:DiscoverFragment.java

示例2: isXLargeTablet

/**
 * Helper method to determine if the device has an extra-large screen. For
 * example, 10" tablets are extra-large.
 */
private static boolean isXLargeTablet(Context context) {
    return (context.getResources().getConfiguration().screenLayout
            & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
 
開發者ID:othreecodes,項目名稱:WaJeun,代碼行數:8,代碼來源:SettingsActivity.java

示例3: isXLargeTablet

/**
 * Helper method to determine if the device has an extra-large screen. For
 * example, 10" tablets are extra-large.
 */
private static boolean isXLargeTablet(Context context) {
	return (context.getResources().getConfiguration().screenLayout
			& Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
 
開發者ID:ScreamingHawk,項目名稱:android-slideshow,代碼行數:8,代碼來源:SettingsActivity.java

示例4: isXLargeTablet

private static boolean isXLargeTablet(Context context) {
    return (context.getResources().getConfiguration().screenLayout
            & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
 
開發者ID:graviton57,項目名稱:TVGuide,代碼行數:4,代碼來源:SettingsActivity.java

示例5: isXLargeTablet

/**
 * Helper method to determine if the device has an extra-large screen. For
 * example, 10" tablets are extra-large.
 */
private static boolean isXLargeTablet(Context context) {
  return (context.getResources().getConfiguration().screenLayout
      & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
 
開發者ID:charlesng,項目名稱:SampleAppArch,代碼行數:8,代碼來源:SettingsActivity.java

示例6: isTablet

private boolean isTablet(){
    int layout = getResources().getConfiguration().screenLayout;
    return (layout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE ||
            (layout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE ;
}
 
開發者ID:jathak,項目名稱:sflauncher,代碼行數:5,代碼來源:MainActivity.java


注:本文中的android.content.res.Configuration.SCREENLAYOUT_SIZE_XLARGE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。