Is it possible to programmatically determine the shape of the Adnroid Wear display, i.e. Is the screen round or square (rectangular)?

    1 answer 1

    According to developer.android.com :

    Android Wear allows you to determine the shape of the screen at run time. To determine whether the screen is square or round, override the onApplyWindowInsets() method in the CanvasWatchFaceService.Engine class as follows:

     private class Engine extends CanvasWatchFaceService.Engine { boolean mIsRound; int mChinSize; @Override public void onApplyWindowInsets(WindowInsets insets) { super.onApplyWindowInsets(insets); mIsRound = insets.isRound(); mChinSize = insets.getSystemWindowInsetBottom(); } ... }