Code example for WindowManager

Methods: getDefaultDisplay

0
        mUserDistance = GalleryUtils.meterToPixel(USER_DISTANCE_METER);
        mLimit = mUserDistance * MAX_VIEW_RANGE;
 
        WindowManager wManager = (WindowManager) mContext
                .getSystemService(Context.WINDOW_SERVICE);
        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 
                .getSystemService(Context.SENSOR_SERVICE); 
        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"); 
        } 
Connect your IDE to all the code out there  Get Codota for Java