Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to prevent orientation switch

How to prevent orientation switch

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

How to prevent orientation switch

Postby Superted » Wed Jul 08, 2009 11:34 am

Hi,

I've been searching for a way to prevent my application from switching to landscape mode. I'm building a game using the accelerometer, and it should just stay in portrait mode..
Does anybody know??

superted
Superted
Junior Developer
Junior Developer
 
Posts: 16
Joined: Sun Jun 14, 2009 12:46 pm
Location: The Netherlands

Top

Postby nmc » Wed Jul 08, 2009 6:47 pm

add
android:screenOrientation="portrait"

to your manifest.xml

(Google: "android manifest orientation")
nmc
Senior Developer
Senior Developer
 
Posts: 154
Joined: Thu Nov 27, 2008 8:30 pm
Location: Germany

Postby Superted » Wed Jul 08, 2009 10:46 pm

Thanks nmc.. sometimes I just can't find what I need.. thanks a lot
Superted
Junior Developer
Junior Developer
 
Posts: 16
Joined: Sun Jun 14, 2009 12:46 pm
Location: The Netherlands

Postby virtual » Thu Jul 16, 2009 11:49 am

Or in Activitie's onCreate(...) code

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); // for landscape

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); // for portrait

Enjoy.
Regards,
Virtual
virtual
Developer
Developer
 
Posts: 26
Joined: Tue Mar 24, 2009 11:20 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests