Dialog doesn't show in a ListActivity

by Daniel Rindt » Mon, 14 Mar 2011 16:38:08 GMT


Sponsored Links
 Dear reader,

my code is pasted here  http://rifers.org/paste/show/1254. 
The problem is that the dialog showContextDialog() is not displayed. The
dialog code is directly used from android examples. I played a lot
around put that code directly in onResume and so on - no efforts.

I'm thankful for all hints to solve that problem.

Thanks for reading
Daniel


-- 



Re: Dialog doesn't show in a ListActivity

by TreKing » Mon, 14 Mar 2011 20:45:04 GMT


 On Mon, Mar 14, 2011 at 3:37 AM, Daniel Rindt




Well, a dialog is not going to be displayed if you don't tell the system to
display it, which is done with the show() method.



Can you post the examples you got that from? Because that's wrong in so many
ways.



1 - Never use getApplicationContext() - it's utterly pointless and just does
not work with dialogs.
2 - Call show() on the Dialog you create to actually show it.

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 


Sponsored Links


Re: Dialog doesn't show in a ListActivity

by Daniel Rindt » Mon, 14 Mar 2011 21:45:40 GMT


 Am Montag, den 14.03.2011, 07:44 -0500 schrieb TreKing:
 http://developer.android.com/guide/topics/ui/dialogs.html #AlertDialog
Its the Paragraph "Adding a list".

How then obtain the Context to display it?

In the docs i found:
AlertDialog.Builder.create();
also shows the Dialog.

Thanks
Daniel

-- 



Re: Dialog doesn't show in a ListActivity

by Mark Murphy » Mon, 14 Mar 2011 21:47:37 GMT


 On Mon, Mar 14, 2011 at 9:43 AM, Daniel Rindt



Your activity *is* a Context.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

Android Training in Oslo:  http://bit.ly/fjBo24 

-- 



Re: Dialog doesn't show in a ListActivity

by TreKing » Mon, 14 Mar 2011 21:55:32 GMT


 On Mon, Mar 14, 2011 at 8:43 AM, Daniel Rindt





Where? In the docs I found:
 http://developer.android.com/reference/android/app/AlertDialog.Builder.html #create()
< http://developer.android.com/reference/android/app/AlertDialog.Builder.html #create()>
< http://developer.android.com/reference/android/app/AlertDialog.Builder.html #create()>


-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 



Re: Dialog doesn't show in a ListActivity

by Daniel Rindt » Mon, 14 Mar 2011 22:18:17 GMT


 Am Montag, den 14.03.2011, 08:53 -0500 schrieb TreKing:
Yes thanks for open up my eyes. :)

Daniel

-- 



Other Threads

1. SQLCipher for Android?

Has anyone done this?  Is there a commercial version available?

-- 

2. Limits send post video and image

Hello,

What is limit to send a video file and image using method http post?

How fixed a limit of size or change a quality of video (high,
medium ...) before send?

Thank you.

-- 

3. OpenGL hardware Accleration.

4. Rich UI Development

5. Android emulator too snow, unusable

6. Oracle Financial Developer Needed in TX -- F2F Required

7. understanding the logic behind the AV sync in Android 2.2