is Rotation Enabled - Android Hardware

Android examples for Hardware:Accelerometer

Description

is Rotation Enabled

Demo Code


//package com.java2s;
import android.content.Context;

import android.provider.Settings;

public class Main {
    public static boolean isRotationEnabled(Context context) {
        return android.provider.Settings.System.getInt(
                context.getContentResolver(),
                Settings.System.ACCELEROMETER_ROTATION, 0) == 1;
    }/*from  ww w .jav  a  2  s  .  co m*/
}

Related Tutorials