Always vertical Screen

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Always vertical Screen

Postby diegomobilefleet » Wed Oct 28, 2009 9:44 am

Hi!

i`m interesting in develop an aplicattion that it`s screen are vertical. If you move the phone to a horizontal position, the view not change. it could be posible??

thanks!.
diegomobilefleet
Freshman
Freshman
 
Posts: 4
Joined: Wed Oct 07, 2009 3:46 pm

Top

Postby asolanki » Wed Oct 28, 2009 10:41 am

hello..
u wtrite a line in ur manifest as shown below(bolded) ... inside the activty..

<activity android:name="GameScreen"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
asolanki
Senior Developer
Senior Developer
 
Posts: 151
Joined: Thu Jan 08, 2009 7:32 am

Postby diegomobilefleet » Wed Oct 28, 2009 11:05 am

asolanki wrote:hello..
u wtrite a line in ur manifest as shown below(bolded) ... inside the activty..

<activity android:name="GameScreen"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>


Thanks !!!
diegomobilefleet
Freshman
Freshman
 
Posts: 4
Joined: Wed Oct 07, 2009 3:46 pm

Postby saamyandroid » Sat Nov 07, 2009 8:43 pm

Thanks ,


N wthat is the use of Following keywords in


android:screenOrientation=

["unspecified" | "user" | "behind" |"sensor" | "nonsensor"]
saamyandroid
Experienced Developer
Experienced Developer
 
Posts: 84
Joined: Wed Sep 09, 2009 8:17 pm
Location: INDIA

Postby rvaul » Sun Nov 15, 2009 12:56 am

saamyandroid wrote:Thanks ,


N wthat is the use of Following keywords in


android:screenOrientation=

["unspecified" | "user" | "behind" |"sensor" | "nonsensor"]



From http://developer.android.com/guide/topi ... ement.html ...


"unspecified" The default value. The system chooses the orientation. The policy it uses, and therefore the choices made in specific contexts, may differ from device to device.

"landscape" Landscape orientation (the display is wider than it is tall).

"portrait" Portrait orientation (the display is taller than it is wide).

"user" The user's current preferred orientation.

"behind" The same orientation as the activity that's immediately beneath it in the activity stack.

"sensor" The orientation determined by a physical orientation sensor. The orientation of the display depends on how the user is holding the device; it changes when the user rotates the device.

"nosensor" An orientation determined without reference to a physical orientation sensor. The sensor is ignored, so the display will not rotate based on how the user moves the device. Except for this distinction, the system chooses the orientation using the same policy as for the "unspecified" setting.
rvaul
Junior Developer
Junior Developer
 
Posts: 18
Joined: Wed Nov 04, 2009 11:25 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests