No, I have seen the black background, I assumed that was due to low
memory. In this case, the window doesn't show up, it is invisible. The
window is there however, as onWindowFocusedChanged occurs, and if you
due something to force it to show.. such as pull down the notification
bar, or hold the home key, then it is visible again.

This issue appears to be a broader theme bug, as I was able to
reproduce the same thing with a theme which only turns off the window
title. I submitted a bug on this here: 
http://code.google.com/p/android/issues/detail?id=2910

Also, just to note, this is 1.5r1.

On Jun 7, 4:54 pm, Jeff Sharkey <[email protected]> wrote:
> When you say "doesn't work", do you mean it shows against a black
> background?  If so, this is a known issue that only shows up when you
> define a custom theme.
>
> j
>
>
>
> On Sat, Jun 6, 2009 at 11:22 PM, Tim H. <[email protected]> wrote:
>
> > Unless I am doing something wrong, transparency is very flaky in 1.5.
> > A number of people have mentioned having to modify their colors to an
> > off-number, such as #cc000001. I have also noticed, on an emulator and
> > an actual device, where transparency no longer works (maybe out of/low
> > memory) and you need to reset.
>
> > This particular bug occurs when an activity is set to use the
> > Transparency theme, after onResume(), occasionally the window takes
> > focus (onWindowFocusChanged is called), but is not displayed. If you
> > pull down the notification bar, it forces your window to be displayed.
> > This same code works as expected in 1.1. To duplicate, run your
> > program (maybe 10 times) by starting, clicking HOME, then starting
> > again.
>
> > I am hoping that someone may have found a workaround, or know of a way
> > to force the window to be shown (as it already has focus).
>
> > Here is the code:
>
> > AndroidTest.java
>
> > package com.test.androidtest;
>
> > import android.app.Activity;
> > import android.database.Cursor;
> > import android.os.Bundle;
> > import android.provider.Contacts.People;
> > import android.util.Log;
> > import android.widget.ListView;
> > import android.widget.SimpleCursorAdapter;
>
> > public class AndroidTest extends Activity {
> >        protected static final String TAG = "Test";
>
> >       �...@override
> >    public void onCreate(Bundle savedInstanceState) {
> >                super.onCreate(savedInstanceState);
> >                Log.w(TAG, "onCreate");
> >                setContentView(R.layout.main);
> >                Cursor peeps = 
> > getContentResolver().query(People.CONTENT_URI, new
> > String[] {People._ID, People.NAME, People.NOTES}, null, null, null);
> >                startManagingCursor(peeps);
> >                ListView list = (ListView) findViewById(R.id.ListView01);
> >                SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
> >                                android.R.layout.simple_list_item_1, peeps,
> >                                new String[] { People.NAME, People.NOTES },
> >                                new int[] { android.R.id.text1, 
> > android.R.id.text2 });
> >                list.setAdapter(adapter);
> >         }
>
> > }
>
> > main.xml
>
> > <RelativeLayout android:id="@+id/RelativeLayout01"
> > xmlns:android="http://schemas.android.com/apk/res/android";
> > android:layout_width="fill_parent" android:layout_height="200dip"
> > android:background="#cc000000">
> > <ListView android:id="@+id/ListView01"
> > android:layout_height="fill_parent"
> > android:layout_width="fill_parent"></ListView>
> > </RelativeLayout>
>
> > AndroidManifest.xml
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <manifest xmlns:android="http://schemas.android.com/apk/res/android";
> >      android:versionCode="1"
> >      android:versionName="1.0.0" package="com.test.androidtest">
> > <application android:icon="@drawable/icon" android:label="@string/
> > app_name" android:theme="@style/Theme.Transparent">
> >        <activity android:name=".AndroidTest" android:launchMode="singleTop"
> > android:theme="@style/Theme.Transparent">
> >                <intent-filter>
> >                <action android:name="android.intent.action.MAIN"></action>
> >                <category android:name="android.intent.category.LAUNCHER"></
> > category>
> >        </intent-filter>
> >        </activity>
> > </application>
> > <uses-sdk android:minSdkVersion="2"></uses-sdk>
> > <uses-permission android:name="android.permission.READ_CONTACTS"></
> > uses-permission>
> > </manifest>
>
> > Using colors.xml and styles.xml from samples
>
> --
> Jeff Sharkey
> [email protected]
--~--~---------~--~----~------------~-------~--~----~
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