Ask your own question, for FREE!
Computer Science 10 Online
OpenStudy (anonymous):

i am learning android.... today i learn how to display dialogue when we accidentally click on the cancel button.... but when i try to implement it is showing some error....!!!

OpenStudy (anonymous):

OpenStudy (anonymous):

@Kainui

OpenStudy (kainui):

It looks like the constructor you're calling, AlertDialog.Builder(), is saying it's undefined because you're trying to pass (this) which isn't defined as an argument for that constructor. So when this happens you either need to override the constructor (DON'T do that haha) or you can pass it the proper type that the constructor needs, which is a (context). So to be clear, I believe you should have on that line: invalidNumberDialog = new AlertDialog.Builder(context) I'm fairly new to a lot of this too, so if it does/doesn't work, tell me so I know and we can try to figure this out.

OpenStudy (factor):

teach me also android plss

OpenStudy (kainui):

@factor http://developer.android.com/index.html is a great place to begin.

OpenStudy (anonymous):

pls solve this also...... there is no error's in the program but it is showing that there is some buffer over flow exception..... @Kainui

OpenStudy (kainui):

Hmm, do you have some sort of try block on some I/O stuff but don't have a catch block to handle it?

OpenStudy (anonymous):

My dear friend, Please can you help me to rectify that problem.... @Kainui really i don't know what to do... I am sorry if i gave any trouble to you....@Kainui

OpenStudy (ajprincess):

Really sry. I dnt knw.

OpenStudy (kainui):

@chetan552 I don't really know, I am not sure, you might be better off trying like a stack exchange site.

OpenStudy (anonymous):

Did you even set the title of alertDialogBuilder yet..?

OpenStudy (anonymous):

Can you explain me indetail..@C0rpse

OpenStudy (anonymous):

@Override public void onClick(View arg0) { AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder( context); alertDialogBuilder.setTitle("whateveritmaybe"); I would assume you have this set.

OpenStudy (anonymous):

Also i think you misspelled negative

OpenStudy (anonymous):

Ya i use the same syntax...@C0rpse

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!