Example usage for android.content.pm ActivityInfo SCREEN_ORIENTATION_FULL_SENSOR

List of usage examples for android.content.pm ActivityInfo SCREEN_ORIENTATION_FULL_SENSOR

Introduction

In this page you can find the example usage for android.content.pm ActivityInfo SCREEN_ORIENTATION_FULL_SENSOR.

Prototype

int SCREEN_ORIENTATION_FULL_SENSOR

To view the source code for android.content.pm ActivityInfo SCREEN_ORIENTATION_FULL_SENSOR.

Click Source Link

Document

Constant corresponding to fullSensor in the android.R.attr#screenOrientation attribute.

Usage

From source file:com.health.openscale.gui.GraphFragment.java

@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
    super.setUserVisibleHint(isVisibleToUser);
    if (isVisibleToUser) {
        Activity a = getActivity();//  w  ww  .j  a  va  2 s .c o  m
        if (a != null)
            a.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
    }
}

From source file:com.mbientlab.metawear.app.LoggingFragment.java

@Override
public void onPause() {
    getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
    super.onPause();
}

From source file:org.zywx.wbpalmstar.engine.EBrowserActivity.java

public final int intoOrientation(int flag) {
    int or = ActivityInfo.SCREEN_ORIENTATION_USER;
    if (flag == 1) {// portrait
        or = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
    } else if (flag == 2) {// landscape
        or = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
    } else if (flag == 4) {// reverse portrait
        or = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
    } else if (flag == 8) {// reverse landscape
        or = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
    } else if (flag == 15) {// sensor
        or = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
    } else {// w  w  w  .  j  a va 2s .co  m
        ;
    }
    return or;
}

From source file:br.com.brolam.cloudvision.ui.NoteVisionActivity.java

/**
 * Bloquear a rotao da tela,//  w  ww  . j a v  a2 s .c  o m
 * @param lock
 */
protected void setLockScreenOrientation(boolean lock) {
    setRequestedOrientation(
            lock ? ActivityInfo.SCREEN_ORIENTATION_LOCKED : ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
}