[android-developers] Re: How to display Dialog Box without showing the Activity!

2009-09-24 Thread Lee

There might be a better way, but this is how I do it:

- assign an ID to the root layout of your activity, and set it to
invisible
- do showDialog in the onCreate method of your activity
- in onDismissDialog of your activity, do rootLayout.setVisibility
(View.VISIBLE)

You get a black screen behind the dialog though. Guess you could
fiddle with
your activity background (e.g. transparent) to avoid this.

Lee

On Sep 24, 10:33 am, Abdul Mateen abmat...@gmail.com wrote:
 Hi,
 I want to display Dialog Box when the application is launched before loading
 and launching the activity.

 or you can say I want to show the dialog on launcher after the launch of my
 application.
--~--~-~--~~~---~--~~
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: How to display Dialog Box without showing the Activity!

2009-09-24 Thread Abdul Mateen
hmm thank you!

- assigning an ID to root layout and setting it to invisible fine! works
- but can you tell me how do I set the background of activity to be
transparent there is no attribute in Manifest as background!

On Thu, Sep 24, 2009 at 4:46 PM, Lee lee.wil...@googlemail.com wrote:


 There might be a better way, but this is how I do it:

 - assign an ID to the root layout of your activity, and set it to
 invisible
 - do showDialog in the onCreate method of your activity
 - in onDismissDialog of your activity, do rootLayout.setVisibility
 (View.VISIBLE)

 You get a black screen behind the dialog though. Guess you could
 fiddle with
 your activity background (e.g. transparent) to avoid this.

 Lee

 On Sep 24, 10:33 am, Abdul Mateen abmat...@gmail.com wrote:
  Hi,
  I want to display Dialog Box when the application is launched before
 loading
  and launching the activity.
 
  or you can say I want to show the dialog on launcher after the launch of
 my
  application.
 


--~--~-~--~~~---~--~~
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: How to display Dialog Box without showing the Activity!

2009-09-24 Thread Lee

You could have a look at different themes e.g.

android:theme=@android:style/Theme.Light.Panel

(but that one doesn't have a title bar)

You could try switching back to a normal theme afterwards, think it's
Context.setTheme.

Lee

On Sep 24, 11:54 am, Abdul Mateen abmat...@gmail.com wrote:
 hmm thank you!

 - assigning an ID to root layout and setting it to invisible fine! works
 - but can you tell me how do I set the background of activity to be
 transparent there is no attribute in Manifest as background!

 On Thu, Sep 24, 2009 at 4:46 PM, Lee lee.wil...@googlemail.com wrote:

  There might be a better way, but this is how I do it:

  - assign an ID to the root layout of your activity, and set it to
  invisible
  - do showDialog in the onCreate method of your activity
  - in onDismissDialog of your activity, do rootLayout.setVisibility
  (View.VISIBLE)

  You get a black screen behind the dialog though. Guess you could
  fiddle with
  your activity background (e.g. transparent) to avoid this.

  Lee

  On Sep 24, 10:33 am, Abdul Mateen abmat...@gmail.com wrote:
   Hi,
   I want to display Dialog Box when the application is launched before
  loading
   and launching the activity.

   or you can say I want to show the dialog on launcher after the launch of
  my
   application.


--~--~-~--~~~---~--~~
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: How to display Dialog Box without showing the Activity!

2009-09-24 Thread Abdul Mateen
Thank You, I found a way by either
android:theme=@android:style/Theme.Translucent
Or
android:theme=@android:style/Theme.Theme_Dialog

On Thu, Sep 24, 2009 at 7:49 PM, Lee lee.wil...@googlemail.com wrote:


 You could have a look at different themes e.g.

 android:theme=@android:style/Theme.Light.Panel

 (but that one doesn't have a title bar)

 You could try switching back to a normal theme afterwards, think it's
 Context.setTheme.

 Lee

 On Sep 24, 11:54 am, Abdul Mateen abmat...@gmail.com wrote:
  hmm thank you!
 
  - assigning an ID to root layout and setting it to invisible fine! works
  - but can you tell me how do I set the background of activity to be
  transparent there is no attribute in Manifest as background!
 
  On Thu, Sep 24, 2009 at 4:46 PM, Lee lee.wil...@googlemail.com wrote:
 
   There might be a better way, but this is how I do it:
 
   - assign an ID to the root layout of your activity, and set it to
   invisible
   - do showDialog in the onCreate method of your activity
   - in onDismissDialog of your activity, do rootLayout.setVisibility
   (View.VISIBLE)
 
   You get a black screen behind the dialog though. Guess you could
   fiddle with
   your activity background (e.g. transparent) to avoid this.
 
   Lee
 
   On Sep 24, 10:33 am, Abdul Mateen abmat...@gmail.com wrote:
Hi,
I want to display Dialog Box when the application is launched before
   loading
and launching the activity.
 
or you can say I want to show the dialog on launcher after the launch
 of
   my
application.
 
 
 


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