5

getRotation画面の向きに関係なく、常にゼロを返します。2.3を実行している実際のデバイスでこれを実行しています。理由は何ですか?

 Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
 int rotation = display.getRotation();
4

1 に答える 1