How to ignore screen orientation change?

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

How to ignore screen orientation change?

Postby abrli » Tue Feb 24, 2009 3:05 am

It's really annoying that the default setting calls "onPause()" and then "onResume()" and because I'm doing some database related operations, closing the database and then opening it up again while another thread is trying to write to it causes exceptions all the time when user slides in/out the keyboard when the database access is running.

Wondering if there's anyway to completely ignore those signals, apart from soldering off the some hardware sensors...

Cheers!

BTW the settings already lock the screen orientation that it won't change during keyboard slide in/out.

Andy
abrli
Freshman
Freshman
 
Posts: 3
Joined: Fri Feb 20, 2009 9:28 pm
Location: United Kingdom

Top

SOLVED!!!

Postby abrli » Tue Feb 24, 2009 3:27 am

*****PROBLEM SOLVED!*****

All I needed was this piece of magic code in manifest.xml:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <android:configChanges="orientation|keyboardHidden">
Parsed in 0.000 seconds, using GeSHi 1.0.8.4


:-)
Last edited by abrli on Tue Feb 24, 2009 12:29 pm, edited 1 time in total.
abrli
Freshman
Freshman
 
Posts: 3
Joined: Fri Feb 20, 2009 9:28 pm
Location: United Kingdom

Postby MrSnowflake » Tue Feb 24, 2009 12:27 pm

I think theGoogle Android Blog will come to the rescue again :).
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests