Having the same problem :( On Friday, June 29, 2012 1:36:37 AM UTC+3, Johan Bilien wrote: > > Hi, > > I'm trying to place an activity in a floating window, with an action bar. > Something similar to this: > > http://dl.dropbox.com/u/168185/floating-action-bar.jpg > > If I set the theme of my activity to Holo.Light.Dialog, getActionBar() > returns null. > > If I create my own theme, inherit from Holo.Light, and the only change I > make is to set windowIsFloating to true, the app crashes when accessing the > action bar, with: > > java.lang.IllegalStateException: ActionBarImpl can only be used with a > compatible window decor layout > E/AndroidRuntime( 9266): at > com.android.internal.app.ActionBarImpl.init(ActionBarImpl.java:159) > E/AndroidRuntime( 9266): at > com.android.internal.app.ActionBarImpl.<init>(ActionBarImpl.java:137) > E/AndroidRuntime( 9266): at > android.app.Activity.initActionBar(Activity.java:1822) > E/AndroidRuntime( 9266): at > android.app.Activity.getActionBar(Activity.java:1803) > E/AndroidRuntime( 9266): at > com.litl.TestFloating.FloatingActivity.onCreate(FloatingActivity.java:12) > E/AndroidRuntime( 9266): at > android.app.Activity.performCreate(Activity.java:4465) > E/AndroidRuntime( 9266): at > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) > E/AndroidRuntime( 9266): at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919) > > > I've created a test case at > https://github.com/jobi/android-test-code/tree/master/TestFloating > > Thanks >
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en