Screen flip-out on G1

by Kirk » Wed, 29 Apr 2009 02:08:24 GMT

Sponsored Links
 What event in an Activity is called when the screen is flipped out to
expose the keyboard on a G1? I need to save some instance variables,
but it seems like onCreate is being called without onPause, onStop, or
saveInstanceState being called first.

Thanks in advance!

Screen flip-out on G1

by Yusuf T. Mobile » Wed, 29 Apr 2009 06:21:09 GMT

 Normally the activity is destroyed and recreated when Android detects
rotation, unless you specify that you want your activity to handle
events like turning the phone on its side or the keyboard opening.

It's documented here: 
You can read more about rotation here: 

Some tutorials you may come across may be obsolete on one point: there
used to be only the flag keyboardhidden, but Android recently added
hardKeyboardHidden, to handle the case of soft keyboards.

onSaveInstanceState() and onDestroy() should be called before your
activity is killed and revived, I'm not sure why you don't see it.

Yusuf Saib
T  Mobile stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


Sponsored Links

Screen flip-out on G1

by Kirk » Thu, 30 Apr 2009 06:00:37 GMT

 Thanks Yusuf,

I'll take a look at those articles, hopefully they will help!



Other Threads

1. OSK word suggestion ribbon for physical keyboard?

Is there a way to cause the "word suggestion" component of the On-
Screen Keyboard to appear when users begin typing in an EditText with
the Physical keyboard?

2. 120 dpi virtual device picks drawable from drawable-hdpi???

Hi sirs,

I pulling my hair out about this.

I have a made an app. which should run on small devices too. I made a
new logo and put it in res/drawable-ldpi. The logo for high density
devices are located in res/drawable.

When running a virtual device - which is configured to run 120 dpi (I
use a Toast message to verify this on startup) the logo chosen is
STILL the big one ie. from res/drawable.

The ImageView showing the logo is as below

<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:background="@drawable/
mblogo" android:layout_gravity="left" android:layout_marginTop="5dp"></

Anyone have a solution for this???

Regards Morten

3. WebView threads never stop (WebViewCoreThread, CookieSyncManager, http[0-3])

4. Map overlays

5. Pass Array from Java to C (over JNI) work in an activity but fail in a thread?

6. Accessing Email Attachments

7. How to animate between two instances of the same activity?