[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
yeah i referred this tutorial of oogle http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog On Nov 23, 8:11 pm, Jags jag...@gmail.com wrote: I have written below code for showing a custom dialog         void CheckHighScore() {                        

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
I understand that this is coming null because my current activity layout is main.xml. but is it that i need to do a setlayout to mydialog before starting any of my code ? On Nov 23, 8:11 pm, Jags jag...@gmail.com wrote: I have written below code for showing a custom dialog         void

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
ok! i moved the code to onCreateDialog and even tough vg is null, it created the alert. but should vg be null ? but it crashed again ! here is code protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder; AlertDialog alertDialog = null;

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
is it because i am calling it from a handler ? this handler is a private member variable of my activity private Handler myhandler = new Handler() { /* (non-Javadoc) * @see android.os.Handler#handleMessage(android.os.Message) */ @Override

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
ok, this worked, but i dont know what was wrong in my aproach, for the sake of meeting deadline i will use this for now http://www.anddev.org/viewtopic.php?p=12915 in the above example, can I remove the edit text and show some scrollable text info full screen ? any helps are thanked regards

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Lance Nanek
http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog There was a thread recently about how that part of the documentation was wrong, actually. At the minimum you're going to have to replace this line: builder = new AlertDialog.Builder(mContext); With this: builder = new