void alertInputStr(String title, String message, int
numeroCampoEditabile) {
        AlertDialog.Builder alertI = new AlertDialog.Builder(this);
        final int num = numeroCampoEditabile;
        alertI.setTitle(title);
        alertI.setMessage(message);
        input = new EditText(this);
        alertI.setView(input);
        alertI.setPositiveButton("Ok", new
DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int
whichButton) {
                Editable value = input.getText();
                String valInput;
                try {
                    valInput = value.toString();
                } catch (Exception e) {
                    valInput = "";
                }
                switch (num) {
                    case 1:
                        Home.to = valInput;
                        instance.setContentView(new
SendMail(instance));
                        break;
                }
            }
        });
        alertI.setNegativeButton("Cancel", new
DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int
whichButton) {
            }
        });
        alertI.show();
InputMethodManager mgr = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
// only will trigger it if no physical keyboard is open
mgr.showSoftInput(input, InputMethodManager.SHOW_IMPLICIT);
}



On Sep 8, 3:55 am, TreKing <[email protected]> wrote:
> On Wed, Sep 7, 2011 at 7:23 PM, sblantipodi 
> <[email protected]>wrote:
>
> > have you got some code snippet to do it please?
>
> What have you tried?
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to