Theme.Dialog for PreferenceScreen child does not work

by Dianne Hackborn » Mon, 26 Jan 2009 04:20:53 GMT

Sponsored Links
 I can't help you off-hand with the problem, but for what it's worth
preferences really aren't intended to be used with a dialog theme.  Actually
I would stay away from the dialog theme for all but very simple things (like
alerts), since the border takes so much space away from your UI.

Of course in general I don't like dialogs. :)

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.


Theme.Dialog for PreferenceScreen child does not work

by Stoyan Damov » Mon, 26 Jan 2009 16:48:48 GMT


The thing is that if I don't use the dialog theme, the preference
screen would cover my entire view and Android will eventually destroy
it (I've seen this already). So I'm pretty much forced to use the
dialog theme - I don't like it either :(


Sponsored Links

Theme.Dialog for PreferenceScreen child does not work

by Stoyan Damov » Mon, 26 Jan 2009 16:50:05 GMT


That is - Android will destroy the activity, which started the
preference activity because it's view is completely covered by the
child activity's view.


Theme.Dialog for PreferenceScreen child does not work

by Stoyan Damov » Mon, 26 Jan 2009 20:41:25 GMT


Yes, I understand that - the thing is that I don't want my activity to
be stopped, because it's quite heavyweight, might be playing
background music, etc. so I'm left with the dialog theme.



Other Threads

1. Android Init Language: on device-added-<path> on device-removed-<path> fail.

I am writing a service which currently polls the USB bus to look for a
specific device's PID/VID and then creates a handle to that device.

Problem is, once the device is connected and discovered, the polling
method I am using utilizes 99% of the processor:

struct usb_bus *bus;
  struct usb_device *dev;

  usb_find_busses(); /* find all busses */
  usb_find_devices(); /* find all connected devices */

  for (bus = usb_get_busses(); bus; bus = bus->next)
      for (dev = bus->devices; dev; dev = dev->next)
          if (dev->descriptor.idVendor == MY_VID && dev-
              == MY_PID)
              return 0;

  MyLibusbDeviceHandle = NULL;
  return -1;

I use essentially the same function to continually look for the
device, which doesn't take up any resources.  The only difference is
that a handle to the device is returned or null.

I tried using Android's built-in "on device-added-/dev/2-1" and "on
device-removed-/dev/2-1" which my device pops up as when plugged in.
The file is also removed when the device is unplugged, however, the
triggers are not firing my application when the device appears /dev/

on device-added-/sys/bus/usb/devices/
       start conv_srv

on device-removed-/sys/bus/usb/devices/
       stop conv_srv

service conv_srv /system/bin/logwrapper /system/bin/
       user root

I have also tried commenting out "disabled" under the service, but
then my app launches on boot without meeting the specified criteria,
nor does the application detect changes on the bus.

Am I doing something wrong in my init.rc?  Is there another way to
leverage Android to do the "polling" or "watching" of the USB bus for

Any help on this would be greatly appreciated!



2. Android 2.2 emulator is so slow

I just installed android 2.2 SDK and ran emulator.
I found the emulator is very slow, I clicked the menu button, the
emulator like doing slow motion.
I feel it is slower than android 2.1.
I think my computer's hardware is well, 4GB RAM / CPU Core Duo 2.53G
So, what can I do to improve emulator speed?
I can't stand its speed a little bit.
Who can give me some advice?
Thank you.


3. Android Instrumentation - "Unable to resolve Activity" error

4. Manually download Android platform

5. How to implement scrollbar with thumb for fast scrolling

6. Want to retrieve SMSC from stored SMS

7. Drawing a graph