How to dismiss the single select dialog in AlertDialog

by mercury xu » Sun, 15 Mar 2009 13:13:01 GMT


Sponsored Links
 i Vincent

That a good idea , as we know, if we build an alterDlg need following
code

//modify by mercury xu 20090314 in the new sdk
//they don't support this function as showAlert!

new AlertDialog.Builder(loginScreen.this)
.setTitle("Login Data")
.setMessage("Login :" + usrTxt + "\n"+ "PassWords : " + pwdTxt)
.setIcon(R.drawable.icon)
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
setResult(RESULT_OK);
finish();
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
})
.show();

maybe you can try to change the setPositiveButton and setNegativeButton
as Not visible or comment them, and add following code for keyup or keydown
founction.

OnClickListener as setResult(RESULT_OK);
finish();

you can get some useful infomation from
http://developer.android.com/reference/android/app/AlertDialog.html.

boolean
onKeyDown<http://developer.android.com/reference/android/app/AlertDialog.html#onKeyDown%28int,%20android.view.KeyEvent%29>(int
keyCode,
KeyEvent<http://developer.android.com/reference/android/view/KeyEvent.html>event)
A
key was pressed down.
boolean
onKeyUp<http://developer.android.com/reference/android/app/AlertDialog.html#onKeyUp%28int,%20android.view.KeyEvent%29>(int
keyCode,
KeyEvent<http://developer.android.com/reference/android/view/KeyEvent.html>event)
A
key was released.

those two founction I hope that is your need.

Wish good luck and best regards!

Mercury







2009/3/15 vincent Kor <kor.vinc...@gmail.com>


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Remove attention box while activating softkeyboard

How are you all

I am developing android applications. currently I have customized the
sample softkeyAndroid project to include amharic language (Ethiopian
language). The keyboard works well. But when I try to activate it from
the setting (Local & Text) option, it displays some warning message
that says
"This input method may be able to collect all the text you type,
including personal data like password and credit card numbers. ....".

I think this text is include for security purpose. But users may not
be interested to use the keyboard.

So my question is How can I remove this warning message to make the
keyboard available for users (without payment).

or is there anything that I have to consider while developing the
application?


Please help me.

Thank you in advance.

Andu

-- 

2. updating app on android market using different name

Hi,

I believe only the package name have a significance.

You can just change the name of your app (eg. /res/strings.xml/
appname), and resubmit it.

Beside in the market you have a field for the AppName, which I believe
is the name used when browsing the market.

Anyway, the submit process won't let you mess with it, you can try and
upload your new app with a new name and the same package name on top
of your old one. If it is not allowed the market will tell you and
refuse your new version.

You can also try with a dummy app you make just for testing purpose.
You simply won't publish it and remove it afterwards.

I say that from the top of my head, so please come back afterward and
tell us how you did.

Good luck.

Yahel

-- 

3. How to launch YouTube with specified keywords?

4. permisi..

5. Questions to comic contents developer

6. (WTA) How to Rename Shortcut?

7. Ghost radar