[android-developers] Re: Styling Dialog title and background - is this an impossible quest?

2010-11-25 Thread Doug
On Nov 24, 2:15 pm, William Ferguson william.ferguson...@gmail.com
wrote:
 Can you explain to me what the different use is for a Dialog vs an
 Activity?

Which would you use if you didn't want your underlying activity to
pause and stop when the dialog is to be displayed?  (and, by
extension, to be updating its UI while the dialog is present?)

Which would you use if you wanted it to be easy to know whether or not
to display the status bar and title bar while the dialog is
displaying?

Which would you use if you wanted to take advantage of Android's
notion of positive/negative/neutral button placement?

Which would you use if you wanted an easy way to display the progress
of some long-running operation within an activity while not allowing
the user to directly interact with the app?

Which would you use if you were trying to display an urgent message in
response to something that happened in a Service while the app was not
in the foreground?  (This is a little bit of a trick question and
requires some experience with Android, but it's a valid one.)

If you haven't guessed by now, that Dialog and Activity and really
trying to solve two different problems, and you're better off picking
the one that solves your problem in the best possible way.  If you
think another Activity solves your problem better, then go with it,
and understand the ramifications of your choice.

Doug

-- 
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: Styling Dialog title and background - is this an impossible quest?

2010-11-24 Thread William Ferguson
OK, I see how you're doing it now. #requestWindowFeature ..
interesting.

But if you're going to the trouble of creating a subclass of Dialog,
why not create an Activity?
What's the benefit of creating a specific dialog subclass vs an
Activity?


On Nov 24, 5:26 pm, Kumar Bibek coomar@gmail.com wrote:
 I do it through code.

  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.confirm_dialog);

 Here, the layout file contains the title. And then you can override the
 Dialog's setTitle and setMessage methods, to update your own text views in
 the layout.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Wed, Nov 24, 2010 at 12:53 PM, William Ferguson william.ferguson.au@

 gmail.com wrote:
  That sounds great. How?
  I would normally turn the title off on an Actiivty by setting
    item name=android:windowNoTitletrue/item
  in the style for the Activity. How do I do that for a Dialog?

  On Nov 24, 3:28 pm, Kumar Bibek coomar@gmail.com wrote:
   You can set the dialog not to have a title(just like turning the
  Activity's
   title off), and then make your layout have a title bar of your choice. I
   normally extend the Dialog class and create my own.

   Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

   On Wed, Nov 24, 2010 at 7:38 AM, William Ferguson william.ferguson.au@

   gmail.com wrote:
Its clearly easy to do, because some many apps do it, but I can't see
how.
I want to display a very simple dialog, with a Title and Content
(eother TextView or perhaps a WebView).

But I want to style the dialog so that the background of the Title,
Content and the dialog window itself are something other than grey.

I've tried constructing a Dialog and setting the ContentView and
Title, but the title always has the grey background.

I've tried using an AlterDialog#Builder, but if I specify the title
string using #setTilte then I have no control over the background. ie
same as for new Dialog above. I also get the grey background of the
dialog window bleeding through above and below the title and content.

I have tried setting a theme for the application that sets the dialog
styles using
       item name=android:alertDialogStyle@style/
myAlertDialogStyle/item
But that doesn't seem to have any effect. Buut then again the doco
that I have found is extremely vague on details, so I probably messed
it up. If you can point me to some clean and coherent doco I'd be
obliged.

The closest I have come is to construct using AlterDialog#Builder and
use both #setContentView and #setCustomTitle as I can style eahc of
those views, but I still have the grey dialog background bleeding
through.above and below the title and content.

Unless someone can point me in the right direction, the only option I
can see is to ditch the Dialog altogether and just create an Activity
that displays the info I want with the styling I want. This is
trivial, but it feels SO wrong. If you can't easily style, what's the
point of the dialogs at all?

--
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.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



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


Re: [android-developers] Re: Styling Dialog title and background - is this an impossible quest?

2010-11-24 Thread Kumar Bibek
Dailogs have a different use as compared to Activities. So, when you need a
dialog, you have to use one. :) Simple?

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, Nov 24, 2010 at 6:04 PM, William Ferguson william.ferguson.au@
gmail.com wrote:

 OK, I see how you're doing it now. #requestWindowFeature ..
 interesting.

 But if you're going to the trouble of creating a subclass of Dialog,
 why not create an Activity?
 What's the benefit of creating a specific dialog subclass vs an
 Activity?


 On Nov 24, 5:26 pm, Kumar Bibek coomar@gmail.com wrote:
  I do it through code.
 
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   setContentView(R.layout.confirm_dialog);
 
  Here, the layout file contains the title. And then you can override the
  Dialog's setTitle and setMessage methods, to update your own text views
 in
  the layout.
 
  Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
 
  On Wed, Nov 24, 2010 at 12:53 PM, William Ferguson william.ferguson.au@
 
  gmail.com wrote:
   That sounds great. How?
   I would normally turn the title off on an Actiivty by setting
 item name=android:windowNoTitletrue/item
   in the style for the Activity. How do I do that for a Dialog?
 
   On Nov 24, 3:28 pm, Kumar Bibek coomar@gmail.com wrote:
You can set the dialog not to have a title(just like turning the
   Activity's
title off), and then make your layout have a title bar of your
 choice. I
normally extend the Dialog class and create my own.
 
Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
 
On Wed, Nov 24, 2010 at 7:38 AM, William Ferguson 
 william.ferguson.au@
 
gmail.com wrote:
 Its clearly easy to do, because some many apps do it, but I can't
 see
 how.
 I want to display a very simple dialog, with a Title and Content
 (eother TextView or perhaps a WebView).
 
 But I want to style the dialog so that the background of the Title,
 Content and the dialog window itself are something other than grey.
 
 I've tried constructing a Dialog and setting the ContentView and
 Title, but the title always has the grey background.
 
 I've tried using an AlterDialog#Builder, but if I specify the title
 string using #setTilte then I have no control over the background.
 ie
 same as for new Dialog above. I also get the grey background of the
 dialog window bleeding through above and below the title and
 content.
 
 I have tried setting a theme for the application that sets the
 dialog
 styles using
item name=android:alertDialogStyle@style/
 myAlertDialogStyle/item
 But that doesn't seem to have any effect. Buut then again the doco
 that I have found is extremely vague on details, so I probably
 messed
 it up. If you can point me to some clean and coherent doco I'd be
 obliged.
 
 The closest I have come is to construct using AlterDialog#Builder
 and
 use both #setContentView and #setCustomTitle as I can style eahc of
 those views, but I still have the grey dialog background bleeding
 through.above and below the title and content.
 
 Unless someone can point me in the right direction, the only option
 I
 can see is to ditch the Dialog altogether and just create an
 Activity
 that displays the info I want with the styling I want. This is
 trivial, but it feels SO wrong. If you can't easily style, what's
 the
 point of the dialogs at all?
 
 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com
 
 
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 

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

Re: [android-developers] Re: Styling Dialog title and background - is this an impossible quest?

2010-11-24 Thread Kumar Bibek
Morever, if you create your own dialog, which you want to have your custom
appearance, you can use it wherever you want in your application.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, Nov 24, 2010 at 6:04 PM, William Ferguson william.ferguson.au@
gmail.com wrote:

 OK, I see how you're doing it now. #requestWindowFeature ..
 interesting.

 But if you're going to the trouble of creating a subclass of Dialog,
 why not create an Activity?
 What's the benefit of creating a specific dialog subclass vs an
 Activity?


 On Nov 24, 5:26 pm, Kumar Bibek coomar@gmail.com wrote:
  I do it through code.
 
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   setContentView(R.layout.confirm_dialog);
 
  Here, the layout file contains the title. And then you can override the
  Dialog's setTitle and setMessage methods, to update your own text views
 in
  the layout.
 
  Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
 
  On Wed, Nov 24, 2010 at 12:53 PM, William Ferguson william.ferguson.au@
 
  gmail.com wrote:
   That sounds great. How?
   I would normally turn the title off on an Actiivty by setting
 item name=android:windowNoTitletrue/item
   in the style for the Activity. How do I do that for a Dialog?
 
   On Nov 24, 3:28 pm, Kumar Bibek coomar@gmail.com wrote:
You can set the dialog not to have a title(just like turning the
   Activity's
title off), and then make your layout have a title bar of your
 choice. I
normally extend the Dialog class and create my own.
 
Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
 
On Wed, Nov 24, 2010 at 7:38 AM, William Ferguson 
 william.ferguson.au@
 
gmail.com wrote:
 Its clearly easy to do, because some many apps do it, but I can't
 see
 how.
 I want to display a very simple dialog, with a Title and Content
 (eother TextView or perhaps a WebView).
 
 But I want to style the dialog so that the background of the Title,
 Content and the dialog window itself are something other than grey.
 
 I've tried constructing a Dialog and setting the ContentView and
 Title, but the title always has the grey background.
 
 I've tried using an AlterDialog#Builder, but if I specify the title
 string using #setTilte then I have no control over the background.
 ie
 same as for new Dialog above. I also get the grey background of the
 dialog window bleeding through above and below the title and
 content.
 
 I have tried setting a theme for the application that sets the
 dialog
 styles using
item name=android:alertDialogStyle@style/
 myAlertDialogStyle/item
 But that doesn't seem to have any effect. Buut then again the doco
 that I have found is extremely vague on details, so I probably
 messed
 it up. If you can point me to some clean and coherent doco I'd be
 obliged.
 
 The closest I have come is to construct using AlterDialog#Builder
 and
 use both #setContentView and #setCustomTitle as I can style eahc of
 those views, but I still have the grey dialog background bleeding
 through.above and below the title and content.
 
 Unless someone can point me in the right direction, the only option
 I
 can see is to ditch the Dialog altogether and just create an
 Activity
 that displays the info I want with the styling I want. This is
 trivial, but it feels SO wrong. If you can't easily style, what's
 the
 point of the dialogs at all?
 
 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com
 
 
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 

 --
 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] Re: Styling Dialog title and background - is this an impossible quest?

2010-11-24 Thread William Ferguson
Sorry Kumar, I don't follow either of those points.

I can also use an Activity where ever I want to.

Can you explain to me what the different use is for a Dialog vs an
Activity?
AFAICT they are the same except that

a) a Dialog is styled is ensure it does not completely overlay an
underlying Activity (which has life cycle implications for the
underlying Activity). But an Activity can eb styled in the same manner

b) a Dialog is extremely restricted in its layout and which of its
components can be accessed.

So I'm struggling to understand why you would use a Dialog for *any*
type of customized layout or styling.


On Nov 24, 10:38 pm, Kumar Bibek coomar@gmail.com wrote:
 Morever, if you create your own dialog, which you want to have your custom
 appearance, you can use it wherever you want in your application.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Wed, Nov 24, 2010 at 6:04 PM, William Ferguson william.ferguson.au@

 gmail.com wrote:
  OK, I see how you're doing it now. #requestWindowFeature ..
  interesting.

  But if you're going to the trouble of creating a subclass of Dialog,
  why not create an Activity?
  What's the benefit of creating a specific dialog subclass vs an
  Activity?

  On Nov 24, 5:26 pm, Kumar Bibek coomar@gmail.com wrote:
   I do it through code.

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.confirm_dialog);

   Here, the layout file contains the title. And then you can override the
   Dialog's setTitle and setMessage methods, to update your own text views
  in
   the layout.

   Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

   On Wed, Nov 24, 2010 at 12:53 PM, William Ferguson william.ferguson.au@

   gmail.com wrote:
That sounds great. How?
I would normally turn the title off on an Actiivty by setting
  item name=android:windowNoTitletrue/item
in the style for the Activity. How do I do that for a Dialog?

On Nov 24, 3:28 pm, Kumar Bibek coomar@gmail.com wrote:
 You can set the dialog not to have a title(just like turning the
Activity's
 title off), and then make your layout have a title bar of your
  choice. I
 normally extend the Dialog class and create my own.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Wed, Nov 24, 2010 at 7:38 AM, William Ferguson 
  william.ferguson.au@

 gmail.com wrote:
  Its clearly easy to do, because some many apps do it, but I can't
  see
  how.
  I want to display a very simple dialog, with a Title and Content
  (eother TextView or perhaps a WebView).

  But I want to style the dialog so that the background of the Title,
  Content and the dialog window itself are something other than grey.

  I've tried constructing a Dialog and setting the ContentView and
  Title, but the title always has the grey background.

  I've tried using an AlterDialog#Builder, but if I specify the title
  string using #setTilte then I have no control over the background.
  ie
  same as for new Dialog above. I also get the grey background of the
  dialog window bleeding through above and below the title and
  content.

  I have tried setting a theme for the application that sets the
  dialog
  styles using
         item name=android:alertDialogStyle@style/
  myAlertDialogStyle/item
  But that doesn't seem to have any effect. Buut then again the doco
  that I have found is extremely vague on details, so I probably
  messed
  it up. If you can point me to some clean and coherent doco I'd be
  obliged.

  The closest I have come is to construct using AlterDialog#Builder
  and
  use both #setContentView and #setCustomTitle as I can style eahc of
  those views, but I still have the grey dialog background bleeding
  through.above and below the title and content.

  Unless someone can point me in the right direction, the only option
  I
  can see is to ditch the Dialog altogether and just create an
  Activity
  that displays the info I want with the styling I want. This is
  trivial, but it feels SO wrong. If you can't easily style, what's
  the
  point of the dialogs at all?

  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
  android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com

  For more options, visit this group at
 

Re: [android-developers] Re: Styling Dialog title and background - is this an impossible quest?

2010-11-24 Thread Kumar Bibek
underlying Activity (which has life cycle implications for the
underlying Activity).

Precisely why you would want to use an Activity.

And a Dialog is in no way restricted in it's layout. You can put in any
component inside it, and access it as well. Moreover, dialogs don't have the
same lifecycle events as the activity. Dialogs can be basically used for
providing confirmation messages, prompts and also used for taking in small
inputs from the user. All this, of course can be done by using an Activity,
but creating a whole new activity will be an overhead if it's just to
display a confirmation/prompt or asks for 1-3 inputs from the user.


Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Thu, Nov 25, 2010 at 3:45 AM, William Ferguson william.ferguson.au@
gmail.com wrote:

 Sorry Kumar, I don't follow either of those points.

 I can also use an Activity where ever I want to.

 Can you explain to me what the different use is for a Dialog vs an
 Activity?
 AFAICT they are the same except that

 a) a Dialog is styled is ensure it does not completely overlay an
 underlying Activity (which has life cycle implications for the
 underlying Activity). But an Activity can eb styled in the same manner

 b) a Dialog is extremely restricted in its layout and which of its
 components can be accessed.

 So I'm struggling to understand why you would use a Dialog for *any*
 type of customized layout or styling.


 On Nov 24, 10:38 pm, Kumar Bibek coomar@gmail.com wrote:
  Morever, if you create your own dialog, which you want to have your
 custom
  appearance, you can use it wherever you want in your application.
 
  Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
 
  On Wed, Nov 24, 2010 at 6:04 PM, William Ferguson william.ferguson.au@
 
  gmail.com wrote:
   OK, I see how you're doing it now. #requestWindowFeature ..
   interesting.
 
   But if you're going to the trouble of creating a subclass of Dialog,
   why not create an Activity?
   What's the benefit of creating a specific dialog subclass vs an
   Activity?
 
   On Nov 24, 5:26 pm, Kumar Bibek coomar@gmail.com wrote:
I do it through code.
 
 requestWindowFeature(Window.FEATURE_NO_TITLE);
 setContentView(R.layout.confirm_dialog);
 
Here, the layout file contains the title. And then you can override
 the
Dialog's setTitle and setMessage methods, to update your own text
 views
   in
the layout.
 
Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
 
On Wed, Nov 24, 2010 at 12:53 PM, William Ferguson 
 william.ferguson.au@
 
gmail.com wrote:
 That sounds great. How?
 I would normally turn the title off on an Actiivty by setting
   item name=android:windowNoTitletrue/item
 in the style for the Activity. How do I do that for a Dialog?
 
 On Nov 24, 3:28 pm, Kumar Bibek coomar@gmail.com wrote:
  You can set the dialog not to have a title(just like turning the
 Activity's
  title off), and then make your layout have a title bar of your
   choice. I
  normally extend the Dialog class and create my own.
 
  Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
 
  On Wed, Nov 24, 2010 at 7:38 AM, William Ferguson 
   william.ferguson.au@
 
  gmail.com wrote:
   Its clearly easy to do, because some many apps do it, but I
 can't
   see
   how.
   I want to display a very simple dialog, with a Title and
 Content
   (eother TextView or perhaps a WebView).
 
   But I want to style the dialog so that the background of the
 Title,
   Content and the dialog window itself are something other than
 grey.
 
   I've tried constructing a Dialog and setting the ContentView
 and
   Title, but the title always has the grey background.
 
   I've tried using an AlterDialog#Builder, but if I specify the
 title
   string using #setTilte then I have no control over the
 background.
   ie
   same as for new Dialog above. I also get the grey background of
 the
   dialog window bleeding through above and below the title and
   content.
 
   I have tried setting a theme for the application that sets the
   dialog
   styles using
  item name=android:alertDialogStyle@style/
   myAlertDialogStyle/item
   But that doesn't seem to have any effect. Buut then again the
 doco
   that I have found is extremely vague on details, so I probably
   messed
   it up. If you can point me to some clean and coherent doco I'd
 be
   obliged.
 
   The closest I have come is to construct using
 AlterDialog#Builder
   and
   use both #setContentView and #setCustomTitle as I can style
 eahc of
   those views, but I still have the grey dialog background
 bleeding
   through.above and below the title and content.
 
   Unless someone can point me in the right direction, the only
 option
   I
   can see is to ditch the Dialog altogether and just create an
   Activity

[android-developers] Re: Styling Dialog title and background - is this an impossible quest?

2010-11-23 Thread William Ferguson
That sounds great. How?
I would normally turn the title off on an Actiivty by setting
   item name=android:windowNoTitletrue/item
in the style for the Activity. How do I do that for a Dialog?



On Nov 24, 3:28 pm, Kumar Bibek coomar@gmail.com wrote:
 You can set the dialog not to have a title(just like turning the Activity's
 title off), and then make your layout have a title bar of your choice. I
 normally extend the Dialog class and create my own.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Wed, Nov 24, 2010 at 7:38 AM, William Ferguson william.ferguson.au@

 gmail.com wrote:
  Its clearly easy to do, because some many apps do it, but I can't see
  how.
  I want to display a very simple dialog, with a Title and Content
  (eother TextView or perhaps a WebView).

  But I want to style the dialog so that the background of the Title,
  Content and the dialog window itself are something other than grey.

  I've tried constructing a Dialog and setting the ContentView and
  Title, but the title always has the grey background.

  I've tried using an AlterDialog#Builder, but if I specify the title
  string using #setTilte then I have no control over the background. ie
  same as for new Dialog above. I also get the grey background of the
  dialog window bleeding through above and below the title and content.

  I have tried setting a theme for the application that sets the dialog
  styles using
         item name=android:alertDialogStyle@style/
  myAlertDialogStyle/item
  But that doesn't seem to have any effect. Buut then again the doco
  that I have found is extremely vague on details, so I probably messed
  it up. If you can point me to some clean and coherent doco I'd be
  obliged.

  The closest I have come is to construct using AlterDialog#Builder and
  use both #setContentView and #setCustomTitle as I can style eahc of
  those views, but I still have the grey dialog background bleeding
  through.above and below the title and content.

  Unless someone can point me in the right direction, the only option I
  can see is to ditch the Dialog altogether and just create an Activity
  that displays the info I want with the styling I want. This is
  trivial, but it feels SO wrong. If you can't easily style, what's the
  point of the dialogs at all?

  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



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


Re: [android-developers] Re: Styling Dialog title and background - is this an impossible quest?

2010-11-23 Thread Kumar Bibek
I do it through code.

 requestWindowFeature(Window.FEATURE_NO_TITLE);
 setContentView(R.layout.confirm_dialog);

Here, the layout file contains the title. And then you can override the
Dialog's setTitle and setMessage methods, to update your own text views in
the layout.


Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, Nov 24, 2010 at 12:53 PM, William Ferguson william.ferguson.au@
gmail.com wrote:

 That sounds great. How?
 I would normally turn the title off on an Actiivty by setting
   item name=android:windowNoTitletrue/item
 in the style for the Activity. How do I do that for a Dialog?



 On Nov 24, 3:28 pm, Kumar Bibek coomar@gmail.com wrote:
  You can set the dialog not to have a title(just like turning the
 Activity's
  title off), and then make your layout have a title bar of your choice. I
  normally extend the Dialog class and create my own.
 
  Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
 
  On Wed, Nov 24, 2010 at 7:38 AM, William Ferguson william.ferguson.au@
 
  gmail.com wrote:
   Its clearly easy to do, because some many apps do it, but I can't see
   how.
   I want to display a very simple dialog, with a Title and Content
   (eother TextView or perhaps a WebView).
 
   But I want to style the dialog so that the background of the Title,
   Content and the dialog window itself are something other than grey.
 
   I've tried constructing a Dialog and setting the ContentView and
   Title, but the title always has the grey background.
 
   I've tried using an AlterDialog#Builder, but if I specify the title
   string using #setTilte then I have no control over the background. ie
   same as for new Dialog above. I also get the grey background of the
   dialog window bleeding through above and below the title and content.
 
   I have tried setting a theme for the application that sets the dialog
   styles using
  item name=android:alertDialogStyle@style/
   myAlertDialogStyle/item
   But that doesn't seem to have any effect. Buut then again the doco
   that I have found is extremely vague on details, so I probably messed
   it up. If you can point me to some clean and coherent doco I'd be
   obliged.
 
   The closest I have come is to construct using AlterDialog#Builder and
   use both #setContentView and #setCustomTitle as I can style eahc of
   those views, but I still have the grey dialog background bleeding
   through.above and below the title and content.
 
   Unless someone can point me in the right direction, the only option I
   can see is to ditch the Dialog altogether and just create an Activity
   that displays the info I want with the styling I want. This is
   trivial, but it feels SO wrong. If you can't easily style, what's the
   point of the dialogs at all?
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


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