判断是否为平板


   public boolean onIsMultiPane() {
	
        boolean preferMultiPane = getResources().getBoolean(
                com.android.internal.R.bool.preferences_prefer_dual_pane);
        return preferMultiPane;
	
    }



自动分栏

\frameworks\base\core\java\android\preference\PreferenceActivity.java下

    public boolean onIsMultiPane() {
	/*
        boolean preferMultiPane = getResources().getBoolean(
                com.android.internal.R.bool.preferences_prefer_dual_pane);
        return preferMultiPane;
	*/
	
	return true;
    }


你可能感兴趣的:(判断是否为平板)