[android-developers] Re: Theme.Dialog for PreferenceScreen child does not work

2009-01-26 Thread Stoyan Damov

On Sun, Jan 25, 2009 at 10:20 PM, Dianne Hackborn hack...@android.com wrote:
 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. :)


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 :(

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Theme.Dialog for PreferenceScreen child does not work

2009-01-26 Thread Stoyan Damov

On Mon, Jan 26, 2009 at 10:48 AM, Stoyan Damov stoyan.da...@gmail.com wrote:
 On Sun, Jan 25, 2009 at 10:20 PM, Dianne Hackborn hack...@android.com wrote:
 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. :)


 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 :(


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.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Theme.Dialog for PreferenceScreen child does not work

2009-01-26 Thread android_soft

Hi Damov,
Your activity will only be PAUSED  if you use Dialog Theme for a
PreferenceActivity. For other Themes, it is PAUSED and STOPPED, but
not
destroyed or killed. So if you want to restore the state you can do it
in onResume... so no need to use Theme.Dialog in your case unless it
looks good on your app.

-Chander

On Jan 26, 1:49 pm, Stoyan Damov stoyan.da...@gmail.com wrote:
 On Mon, Jan 26, 2009 at 10:48 AM, Stoyan Damov stoyan.da...@gmail.com wrote:
  On Sun, Jan 25, 2009 at 10:20 PM, Dianne Hackborn hack...@android.com 
  wrote:
  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. :)

  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 :(

 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.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Theme.Dialog for PreferenceScreen child does not work

2009-01-26 Thread android_soft

You should move the heavyweight lifting stuff to a Service if you
don't want it to be stopped.
Running background music is something that a background service should
take care of. Here's another thread response from Dianne-
http://groups.google.com/group/android-developers/browse_thread/thread/112189a9893a6462/f66bf1a5848c2c45?hl=enlnk=gstq=background+music#f66bf1a5848c2c45

Then again, I don't know  all your requirements, so I will stop at
that.

Chander

On Jan 26, 5:41 pm, Stoyan Damov stoyan.da...@gmail.com wrote:
 On Mon, Jan 26, 2009 at 11:39 AM, android_soft cspeche...@gmail.com wrote:

  Hi Damov,
  Your activity will only be PAUSED  if you use Dialog Theme for a
  PreferenceActivity. For other Themes, it is PAUSED and STOPPED, but
  not
  destroyed or killed. So if you want to restore the state you can do it
  in onResume... so no need to use Theme.Dialog in your case unless it
  looks good on your app.

  -Chander

 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.

 Cheers,
 Stoyan
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Theme.Dialog for PreferenceScreen child does not work

2009-01-25 Thread Stoyan Damov

+1 - I'm experiencing the same thing here. The PreferenceScreen is
drawn with the black theme. BTW, preferences with the dialog theme act
weird when scrolled (parts of the preferences are drawn on black
background black while scrolling) but I think I can fix that - someone
mentioned about cacheColor or something like that...

On Sun, Jan 25, 2009 at 12:21 PM, android_soft cspeche...@gmail.com wrote:

 Hi All,
 I have a PreferenceActivity defined in the manifest with
 android:theme=@android:style/Theme.Dialog. The theme works well with
 the first settings screen, but
 not with the child PreferenceScreen elements (if I have several
 screens in my preferences). The child screens have the default Theme
 applied in this case.

 If the theme is changed to Theme.Light or the default, it works well
 for all the screens(parent and children included)

 Is there a way to apply the theme to the children, or is this a BUG ?

 Thanks
 Chander
 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Theme.Dialog for PreferenceScreen child does not work

2009-01-25 Thread android_soft

It gets even more weird if you have the landscape mode (i guess thats
what you are talking above)


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Theme.Dialog for PreferenceScreen child does not work

2009-01-25 Thread Dianne Hackborn
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. :)

On Sun, Jan 25, 2009 at 4:37 AM, Stoyan Damov stoyan.da...@gmail.comwrote:


 +1 - I'm experiencing the same thing here. The PreferenceScreen is
 drawn with the black theme. BTW, preferences with the dialog theme act
 weird when scrolled (parts of the preferences are drawn on black
 background black while scrolling) but I think I can fix that - someone
 mentioned about cacheColor or something like that...

 On Sun, Jan 25, 2009 at 12:21 PM, android_soft cspeche...@gmail.com
 wrote:
 
  Hi All,
  I have a PreferenceActivity defined in the manifest with
  android:theme=@android:style/Theme.Dialog. The theme works well with
  the first settings screen, but
  not with the child PreferenceScreen elements (if I have several
  screens in my preferences). The child screens have the default Theme
  applied in this case.
 
  If the theme is changed to Theme.Light or the default, it works well
  for all the screens(parent and children included)
 
  Is there a way to apply the theme to the children, or is this a BUG ?
 
  Thanks
  Chander
  
 

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Theme.Dialog for PreferenceScreen child does not work

2009-01-25 Thread android_soft

Hi Dianne,
Thanks for your response. I don't like Dialogs either. :)
still a bug...:-) ; even if rendering is not proper, I expect at least
the child PreferenceScreen to have the same Theme.


Regards,
Chander

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---