How to change the orientation of the activity. Androidのアプリケーション(Activity)は画面の向き(縦・横)を設定できます。 設定する方法はいくつかあります。 1.マニフェスト(AndroidManifest.xml)のandroid:screenOrientationに設定する 2.ActivityのsetRequestedOrientationで設定する 今回は「2.ActivityのsetRequestedOrientationで設定する」の方法で画面の向きを自由に変更するアプリケーションを作ってみます。 (パーミッションは不要なのでマニフェストは省略します) レイアウト(main.xml) <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=