Back to project page FxCameraApp.
The source code is released under:
MIT License
If you think the Android project FxCameraApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.af.experiments.FxCameraApp.display; //from w ww. jav a 2 s. c o m import android.content.Context; import android.graphics.Point; import android.view.Display; import android.view.WindowManager; public class DisplayHelperBase implements DisplayHelper { private Context mContext; public DisplayHelperBase(final Context context) { mContext = context; } protected final Context getContext() { return mContext; } protected final Display getDefaultDisplay() { return ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); } @SuppressWarnings("deprecation") @Override public int getDisplayAngle() { return getDefaultDisplay().getOrientation(); } @SuppressWarnings("deprecation") @Override public Point getDisplaySize() { final Display display = getDefaultDisplay(); return new Point(display.getWidth(), display.getHeight()); } @Override public Point getRawDisplaySize() { return getDisplaySize(); } }