How to prevent an app from switching the layout to landscape.

by Edo Noordhuizen » Thu, 09 Jul 2009 00:36:26 GMT


Sponsored Links
 Hi,

I can't seem to find a way to prevent my application from switching to
landscape orientation when I tilt my G1.
I need to prevent my app from switching to landscape mode so my game
does not become unplayable! :-(

Can anybody tell me how to prevent this??

Thanks,
Edo

--~--~---------~--~----~------------~-------~--~----~



How to prevent an app from switching the layout to landscape.

by Mark Murphy » Thu, 09 Jul 2009 00:39:22 GMT


 


android:screenOrientation="portrait" in your manifest will do it:

 http://developer.android.com/guide/topics/manifest/activity-element.html 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to prevent an app from switching the layout to landscape.

by Alslayer » Fri, 10 Jul 2009 03:47:46 GMT


 I just found the android:screenOrientation="portrait" and it works
great.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Network query apis

Hi,

Could anyone please let me know how to monitor network traffic on
android? I am looking to calculate the data usage of my emails(gmail)
on android phone.

I am looking for
1. The INTENT FILTER name to register to listen for email activity.
2. How to query for attachment?

Generally, how to monitor any network traffic? Any pointers would be
helpful.

Thanks,
Bobby

--~--~---------~--~----~------------~-------~--~----~

2. How to assign/get the ip address of an emulator

I am running a server application on emulator. I want to connect to
the server through a client application running on other system.
How to get the IP of the emulator and what should be the http-proxy ip
of the emulator.
Any help is appreciable.
--~--~---------~--~----~------------~-------~--~----~

3. How to connect content provider in ProviderTestCase2 class?

4. How to use remapCoordinateSystem of SensorManager

5. pmem usage in opencore of Android1.5

6. Emulator not showing on screen from cmd.

7. Changing one TextView with onSensorChanged without Redrawing the Entire Layout