Hmm. Well, sounds like you are describing a race condition in the platform.

All our activities are theme 
"@android:style/Theme.Black.NoTitleBar.Fullscreen" and they still 
wiggled, so that's not enough to close the window.

Perhaps in our case, we make it happen because on being foregrounded 
we switch to another activity in onCreate(), and whatever "optimized" 
path is taken in that case reliably causes the situation you describe.

Not a problem in 1.0, 1.1 BTW.

-- Ward


At 3:43 PM -0700 7/13/09, Dianne Hackborn wrote:
>Note this this will break your interaction with the IME, if it is 
>displayed.  What is going on is that during the transition to your 
>app, the status bar is still visible, so if you have something at 
>the top of the UI that is in focus it will move your window to make 
>it visible behind the status bar.
>
>You can use this by using the Fullscreen theme, so the system knows 
>your window will be fullscreen a bit earlier.  There can still be 
>some interesting timing in the transition that still leaves the 
>status bar visible initially, which hopefully will be improved in a 
>future version of the platform.
>
>On Mon, Jul 13, 2009 at 2:33 PM, Ward Willats 
><<mailto:[email protected]>[email protected]> wrote:
>
>
>YES! Fixes it here too. Nice diagnosis/hacking Brady. Thanks very
>much. (And yes, it must be a bug.)
>
>-- Ward
>
>
>
>At 1:12 PM -0700 7/13/09, Brady wrote:
>>Hey Ward,
>>
>>looks like exactly the same problem! Does my workaround fix your
>>issue?
>>
>>Brady
>>
>>On Jul 13, 1:02 pm, Ward Willats 
>><<mailto:[email protected]>[email protected]> wrote:
>>>   Me too. Can't believe you and I are the only two who see this.
>>>
>  >> 
> <http://groups.google.com/group/android-developers/browse_thread/threa.>http://groups.google.com/group/android-developers/browse_thread/threa...
>>>
>>>   -- Ward
>>>
>>>   At 12:50 PM -0700 7/13/09, Brady wrote:
>>>
>>>   >Hi, just a quick note, bug.java was really named StatusBarBug.java
>>>   >like my project.
>>>
>>>   >Cheers,
>>>   >Brady
>>>
>>>   >On Jul 13, 12:46 pm, Brady 
>>><<mailto:[email protected]>[email protected]> wrote:
>>>   >>  Hi guys,
>>>
>>>   >>  I've found an irritating bug that I could please use some help with.
>>>
>>>   >>  My application is styled to show no title (android:windowNoTitle) and
>>>   >>  in onCreate() in the activity the system toolbar is hidden to display
>>>   >>  as fullscreen. There are two buttons in the activity's relative
>>>   >>  layout, aligned top of parent and bottom. The bug happens 
>>>when I use 5-
>>>   >>  way navigation to focus the top button. The screen momentarily shifts
>>>   >>  or bounces down the size of the default titlebar. In some instances
>>>   >>  part of the bottom content gets clipped. Here is a mini app I created
>>>   >>  to reproduce the bug. Any help to workaround this bug would be
>>>   >>  appreciated! Note: you may have to run the app twice to see this
>>>   >>  behavior.
>>>
>>>   >>  Brady
>>>
>>>   >>  [bug.java]
>>>
>>>   >>  package com.adobe.test;
>>>
>>>   >>  import android.app.Activity;
>>>   >>  import android.os.Bundle;
>>>   >>  import android.view.WindowManager;
>>>
>>>   >>  public class StatusBarBug extends Activity {
>>>   >>      /** Called when the activity is first created. */
>>>   >>      @Override
>>>   >>      public void onCreate(Bundle savedInstanceState)
>>>   >>      {
>>>   >>          super.onCreate(savedInstanceState);
>>>
>>>   >>getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
>>>   >>  WindowManager.LayoutParams.FLAG_FULLSCREEN);
>>>
>>>   >>          setContentView(R.layout.main);
>>>   >>      }
>>>
>>>   >>  }
>>>
>>>   >>  [main.xml]
>>>
>>>   >>  <?xml version="1.0" encoding="utf-8"?>
>>>   >>  <RelativeLayout 
>>>xmlns:android="<http://schemas.android.com/apk/res/>http://schemas.android.com/apk/res/
>>>   >>  android"
>>>   >>          android:layout_width="fill_parent"
>>>   >>          android:layout_height="fill_parent">
>>>
>>>   >>                  <Button
>>>   >>                          android:layout_width="wrap_content"
>  >>  >>                          android:layout_height="wrap_content"
>>>   >>                          android:text="button"/>
>>>
>>>   >>                  <Button android:layout_width="wrap_content"
>>>   >>                          android:layout_height="wrap_content"
>>>   >>                          android:layout_alignParentBottom="true"
>>>   >>                          android:text="button2">
>>>   >>                          <requestFocus/>
>>>   >>                  </Button>
>>>
>>>   >>  </RelativeLayout>
>>>
>>>   >>  [styles.xml]
>>>
>>>   >>  <?xml version="1.0" encoding="utf-8"?>
>>>   >>  <resources>
>>>   >>    <!-- Themes -->
>>>   >>    <style name="StatusBarTheme">
>>>   >>          <item name="android:windowNoTitle">true</item>
>>>   >>    </style>
>>>   >>  </resources>
>>>
>>>   >>  [manifest.xml]
>>>
>>>   >>  <?xml version="1.0" encoding="utf-8"?>
>>>   >>  <manifest 
>>>xmlns:android="<http://schemas.android.com/apk/res/android>http://schemas.android.com/apk/res/android";
>>>   >>        package="com.adobe.test"
>>>   >>        android:versionCode="1"
>>>   >>        android:versionName="1.0">
>>>   >>      <application android:icon="@drawable/icon" android:label="@string/
>>>   >>  app_name"
>>>   >>          android:theme="@style/StatusBarTheme">
>>>   >>          <activity android:name=".StatusBarBug"
>>>   >>                    android:label="@string/app_name">
>>>   >>              <intent-filter>
>>>   >>                  <action android:name="android.intent.action.MAIN" />
>>>   >>                  <category
>>>   >>  android:name="android.intent.category.LAUNCHER" />
>>>   >>              </intent-filter>
>>>   >>          </activity>
>>   > >>      </application>
>>>   >>      <uses-sdk android:minSdkVersion="3" />
>>>   >>  </manifest>
>>>
>>>
>>
>
>
>
>
>--
>Dianne Hackborn
>Android framework engineer
><mailto:[email protected]>[email protected]
>
>Note: please don't send private questions to me, as I don't have 
>time to provide private support, and so won't reply to such e-mails. 
> All such questions should be posted on public forums, where I and 
>others can see and answer them.
>
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to