Saturday, October 22, 2011

[android-developers] Re: Custom Dialog Not Showing

No, I haven't. It seems that onPrepareDialog is used when you want the
property of a dialog to be changed when opened again. If I do override
it, is there anything that I need to do in onPrepareDialog that I
haven't done in onCreateDialog?

On Oct 22, 10:37 am, Christopher Van Kirk
<christopher.vank...@gmail.com> wrote:
> Did you override the prepareDialog method as well?
>
> On 10/23/2011 1:30 AM, Alex Oh wrote:
>
>
>
>
>
>
>
> > I've read the google docs on Dialogs and posts here and on Stack
> > Overflow, but I just can't get my dialog to show.
>
> > showDialog( DIALOG_CREATEPC ); // called elsewhere
>
> > private Dialog addPCDialog()
> > {
> >     Dialog dialog = new Dialog( this );
>
> >     dialog.setContentView( R.layout.party_createpc );
> >     dialog.setTitle( "Add PC" );
> >     ...
> >     return dialog
> > }
>
> > @Override
> > protected Dialog onCreateDialog( int id )
> > {
> >      Dialog dialog;
> >          switch( id )
> >          {
> >              case DIALOG_CREATEPC:
> >                  dialog = addPCDialog();
> >                  break;
> >              default:
> >                  dialog = null;
> >          }
> >          return dialog;
> >      }
>
> > Am I missing something here?

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate