List of usage examples for android.view View getDisplay
public Display getDisplay()
From source file:com.brotherpowers.cameraview.ViewCompat2.java
/** * Gets the logical display to which the view's window has been attached. * * @param view The view./* www. j a v a 2 s .c om*/ * @return The logical display, or null if the view is not currently attached to a window. */ public static Display getDisplay(@NonNull View view) { if (Build.VERSION.SDK_INT >= 17) { return view.getDisplay(); } return ViewCompat.isAttachedToWindow(view) ? DisplayManagerCompat.getInstance(view.getContext()).getDisplay(Display.DEFAULT_DISPLAY) : null; }