Code example for WindowManager

Methods: getDefaultDisplay

        mUserDistance = GalleryUtils.meterToPixel(USER_DISTANCE_METER);
        mLimit = mUserDistance * MAX_VIEW_RANGE;
        WindowManager wManager = (WindowManager) mContext
        mDisplay = wManager.getDefaultDisplay();
        // The 3D effect where the photo albums fan out in 3D based on angle 
        // of device tilt is currently disabled. 
        SensorManager sManager = (SensorManager) mContext 
        mSensor = sManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); 
        if (mSensor == null) { 
            Log.w(TAG, "no gyroscope, use accelerometer instead"); 
            mSensor = sManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 
        if (mSensor == null) { 
            Log.w(TAG, "no sensor available"); 
Contextual code suggestions in your IDE  Get Codota for Java