Unset Orientation - Android User Interface

Android examples for User Interface:Screen Orientation

Description

Unset Orientation

Demo Code


//package com.java2s;
import android.app.Activity;

import android.content.pm.ActivityInfo;

public class Main {
    public static void UnsetOrientation(Activity context) {
        context.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
    }/* ww  w . j a v  a2  s. com*/
}

Related Tutorials