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. Plug in in contact/calendar

Hi, All:

Is possible to add a plug-in/Menu in the Contact application? For
example, if user select some contacts, and the 3rd party menu will be
insert into the system default one, like "Search in XXX". Then after
select the menu, the 3rd party service or activity can be called.

Welcome any helps for it.
Louis.
--~--~---------~--~----~------------~-------~--~----~

2. For modular requirement

Hi, All:

Our products which running in other platform are using the modular
approach, which means if user want to add a new feature, he/she only
need to download a new plug-in, but not reinstall the who application.
And we used COM library base ideas to do that before, is there anyway
to do it in Android?

Welcome any help for it.

Best regards,
Louis.
--~--~---------~--~----~------------~-------~--~----~

3. java.awt.polygon equivalent in android?

4. TabActivity vs VideoView vs Camera Preview contention

5. TabActivity vs VideoView vs Camera Preview contention

6. When an app needs Google account credentials...

7. Where do I put my .adk file?