how can i set SCREEN ORIENTATION PORTRAIT ,SCREEN ORIENTATION BEHIND , SCREEN ORIENTATION LANDSCAPE ,SCREEN ORIENTATION NOSEN,SCREEN ORIENTATION SENSO,SCREEN ORIENTATION UNSPECIFIED,SCREEN ORIENTATION USER


public static final int SCREEN_ORIENTATION_PORTRAIT
Since: API Level 1
Constant corresponding to

portrait in the

screenOrientation attribute.

Constant Value: 1

(0x00000001)

android code to set PORTRAIT screen :

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

////////////////////////////

/////////
public static final int SCREEN_ORIENTATION_BEHIND
Since: API Level 1
Constant corresponding to
behind in the
screenOrientation attribute.
Constant Value: 3
(0x00000003)
 android code to set BEHIND screen :
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_BEHIND);
////////////////////////////

//

public static final int SCREEN_ORIENTATION_LANDSCAPE
Since: API Level 1
Constant corresponding to

landscape in the

screenOrientation attribute.
Constant Value: 0
(0x00000000)

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

////////////////////////////

///
  int android.content.pm.ActivityInfo.SCREEN_ORIENTATION_NOSEN

SOR = 5 [0x5]
public static final int SCREEN_ORIENTATION_NOSENSOR
Since: API Level 1
Constant corresponding to
nosensor in the screenOrientation attribute.
Constant Value: 5

(0x00000005)

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);
//////////////////////////

int android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSO
R = 4 [0x4]
public static final int SCREEN_ORIENTATION_SENSOR
Since: API Level 1
Constant corresponding to
sensor in the screenOrientation attribute.
Constant Value: 4
(0x00000004)

  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
////////////////////////////

///
int android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED = -1 [0xffffffff]
public static final int SCREEN_ORIENTATION_UNSPECIFIED
Since: API Level 1
Constant corresponding to
unspecified in the screenOrientation attribute.
Constant Value: -1
(0xffffffff)
   setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
//////////////////////////

int android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER
= 2 [0x2]
public static final int SCREEN_ORIENTATION_USER
Since: API Level 1
Constant corresponding to
user in the screenOrientation attribute

Constant Value: 2
(0x00000002)

   setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER);

No comments:

IRCTC Share Price Declines by 2% Despite 30% Jump in Q4 Net Profit; Board Announces Dividend of INR 2 per Share

Introduction: The share price of Indian Railway Catering and Tourism Corporation (IRCTC) experienced a decline of 2% in today's trading ...