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. how can change controll to main thread from new other thread?

yes...
but a better way to use handler for progress dialogbox is with messages like
this:

Handler h=new Handler(){

@Override
void handleMessage(Message msg){
}
};

send message for each progress update...

2009/8/20 tstanly <tsai.sta...@gmail.com>






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

2. What happens when more activities 'listen' to the same intent?

Intents can start activity's, what happens if two or more activities 
listen to the same intent, i.e. the both have an intenfilter defined 
with the same android:name?

How is the decisive process being performed?

Jiri

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

3. WebView opening browser

4. how can change controll to main thread from new other thread?

5. Android phones call on Indian consumers

6. Portuguese localization?

7. how can change controll to main thread from new other thread?