Android Wear のウォッチフェイスを開発しているときに、Moto 360 のように、画面が丸くてあご (パンクしたタイヤ バンド) があるかどうかをどのように検出できますか? 試してみonSurfaceChanged
ましたが、あちらでは幅と高さが同じです。
あごを持つエミュレーターでこれを試しましたが、まだあごを検出できません。エミュレーターまたは私のコードに問題がありますか?:
@Override
void onApplyWindowInsets(WindowInsets insets) {
super.onApplyWindowInsets(insets);
// check if MOTO360 or other Chin layouts
Log.d(TAG,String.format("isRound : %s, BottomInset :%d",insets.isRound()?"YES":"NO",insets.getStableInsetBottom()));
// LOG OUTPUT : isRound : YES, BottomInset :0
if (insets.isRound() && insets.getStableInsetBottom() > 0)
ClockPaintingRoutines.flat_display_mode=true;
}