Screen orientation in tablet
I am using the same code for both tablets and mobile, and I want to write an app for Xlarge screens with landscape. I wrote one condition but when I am rotating into portrait it generates an exception.
I have declared the condition:
final boolean isPortrait = getResources().getConfiguration().orientation ==Configuration.ORIENTATION_PORTRAIT;
I want code wit开发者_运维知识库h if else condition using xlarge and landscape orientations but it should work for only tablets but while coming to mobile it should not work.
There are two methods to make an application full screen. The first simply states the application supports a specific dpi. The following code in the Manifest supports all dpis.
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true" />
精彩评论