2010年5月11日火曜日

Android:画面の向きの固定 Portrait Landscape を指定するには How to Fix Screen Orientation

How to Fix screen orientation and rotation
Android1.6
Eclipse GALIREO / WindowsXP
AndroidManifest.xml
screenOrientation,unspecified,portrait,landscape,user,behind,sensor,nosensor
----
Androidの画面の向きの設定

Androidには画面の向きにあわせて自動的に画面を回転する機能がありますが、
アプリケーションによっては固定したいこともあります。
画面を固定するには、AndroidManifest.xml ファイルを編集することで出来ます。

AndroidManifest.xmlファイルを開きます。
Open AndroidManifest.xms



①下のタブの中から[Application]を選びます。
Select "Application" tab

②Application Nodesから(Activity)を選択します。ここでは、[.TestGravityActivity(Activity)]となっているところです。
Select Activity from "Application Nodes"

③画面右下から[Screen orientation]を選択します。
Select "Screen orientation"

 unspicified : システム自動設定 ユーザーの画面の向けた方向に自動回転します。/ Auto rotation
 landscape : 横長方向固定 / Fix landscape
 portrait : 縦長方向固定 / Fix portrait
 user : 現在のレイアウトに従います ユーザーの操作により切り替わります
 behind : 親のアクティビティーに従います ユーザーの操作により切り替わります
 sensor : センサーに従います
 nosensor : センサーを無視します

.

0 件のコメント:

コメントを投稿