[android-developers] Re: Alert input must show the keyboard.

2011-09-01 Thread sblantipodi
no effect on the EditText appened to alert.

alertI.show();
input.requestFocus();

no focus is set to input EditText.

any idea?


On Sep 1, 2:12 pm, TreKing  wrote:
> On Thu, Sep 1, 2011 at 4:09 AM, sblantipodi 
> wrote:
>
> > Is it possible to display the alert input with the keyboard opened, without
> > the needs to tap a second time to open the keyboard?
>
> Request focus on the 
> EditText.http://developer.android.com/reference/android/view/View.html#request...()
>
> -
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Alert input must show the keyboard.

2011-09-01 Thread sblantipodi
'm showing an input box using AlertDialog. The EditText inside the
dialog itself is automatically focused when I call AlertDialog.show(),
but the soft keyboard is not automatically shown.

How do I make the soft keyboard automatically show when the dialog is
shown? (and there is no physical/hardware keyboard). Similar to how
when I press the Search button to invoke the global search, the soft
keyboard is automatically shown.

On Sep 1, 2:12 pm, TreKing  wrote:
> On Thu, Sep 1, 2011 at 4:09 AM, sblantipodi 
> wrote:
>
> > Is it possible to display the alert input with the keyboard opened, without
> > the needs to tap a second time to open the keyboard?
>
> Request focus on the 
> EditText.http://developer.android.com/reference/android/view/View.html#request...()
>
> -
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Alert input must show the keyboard.

2011-09-01 Thread sblantipodi
thanks for the answer, this:

input.setSelected(false);
alertI.show();
input.setSelected(false);

doesn't remove the focus from the edittext.
how to remove it?

On Sep 1, 11:27 pm, TreKing  wrote:
> On Thu, Sep 1, 2011 at 3:43 PM, sblantipodi 
> wrote:
>
> > The EditText inside the dialog itself is automatically focused when I call
> > AlertDialog.show(), but the soft keyboard is not automatically shown.
>
> Then try removing focus from it first, then requesting it back.
>
> -
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Alert input must show the keyboard.

2011-09-01 Thread sblantipodi
just tried
input.clearFocus();
alertI.show();
input.clearFocus();

same result, edittext is focused.


On Sep 1, 11:27 pm, TreKing  wrote:
> On Thu, Sep 1, 2011 at 3:43 PM, sblantipodi 
> wrote:
>
> > The EditText inside the dialog itself is automatically focused when I call
> > AlertDialog.show(), but the soft keyboard is not automatically shown.
>
> Then try removing focus from it first, then requesting it back.
>
> -
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Alert input must show the keyboard.

2011-09-02 Thread sblantipodi
this is not the way.
if you search on internet this is a commond problem but I can't find a
solution.

On Sep 2, 1:21 am, TreKing  wrote:
> On Thu, Sep 1, 2011 at 5:50 PM, sblantipodi 
> wrote:
>
> > how to remove it?
>
> Request focus on something else first?
>
> -
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Alert input must show the keyboard.

2011-09-02 Thread sblantipodi
try and retry is really expensive but thanks for the suggestions.

can't understand why something as simple should became as difficult.

On Sep 2, 1:33 pm, TreKing  wrote:
> On Fri, Sep 2, 2011 at 5:15 AM, sblantipodi 
> wrote:
>
> > this is not the way.
> > if you search on internet this is a commond problem but I can't find
> > a solution
>
> Create an Activity themed like a dialog instead of an AlertDialog? I'm just
> going to keep throwing suggestions at you until something works =P
>
> -
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Alert input must show the keyboard.

2011-09-02 Thread sblantipodi
it doesn't works.
can't understand how to do that. -_-

On Sep 2, 3:20 pm, TreKing  wrote:
> On Fri, Sep 2, 2011 at 8:01 AM, sblantipodi 
> wrote:
>
> > can't understand why something as simple should became as difficult.
>
> That is an unfortunate reality of software development =P
>
> -
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Alert input must show the keyboard.

2011-09-02 Thread sblantipodi
Just solved, I post the solution, just for reference.

myAlertDialog.show();
showVirturalKeyboard();

this is the showVirtualKeyboard() method:

// Mostra la tastiera virtuale
private void showVirturalKeyboard() {
Timer timer = new Timer();
timer.schedule(new TimerTask() {

@Override
public void run() {
InputMethodManager m = (InputMethodManager)
MCPRO.this.getSystemService(Context.INPUT_METHOD_SERVICE);

if (m != null) {
// m.toggleSoftInput(0,
InputMethodManager.HIDE_NOT_ALWAYS);
m.toggleSoftInput(0,
InputMethodManager.SHOW_IMPLICIT);
}
}
}, 100);
}



On Sep 2, 5:06 pm, sblantipodi  wrote:
> it doesn't works.
> can't understand how to do that. -_-
>
> On Sep 2, 3:20 pm, TreKing  wrote:
>
>
>
>
>
>
>
> > On Fri, Sep 2, 2011 at 8:01 AM, sblantipodi 
> > wrote:
>
> > > can't understand why something as simple should became as difficult.
>
> > That is an unfortunate reality of software development =P
>
> > -
> > 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Alert input must show the keyboard.

2011-09-04 Thread sblantipodi
this solution is good for all platforms minor of android 3.

With android 3 the toogleSoftInput close the keyboard since android 3
open the softkeyboard by default.

Is there a way to openKeyboard without toogle it?

On Sep 2, 8:59 pm, sblantipodi  wrote:
> Just solved, I post the solution, just for reference.
>
> myAlertDialog.show();
> showVirturalKeyboard();
>
> this is the showVirtualKeyboard() method:
>
> // Mostra la tastiera virtuale
>     private void showVirturalKeyboard() {
>         Timer timer = new Timer();
>         timer.schedule(new TimerTask() {
>
>             @Override
>             public void run() {
>                 InputMethodManager m = (InputMethodManager)
> MCPRO.this.getSystemService(Context.INPUT_METHOD_SERVICE);
>
>                 if (m != null) {
>                     // m.toggleSoftInput(0,
> InputMethodManager.HIDE_NOT_ALWAYS);
>                     m.toggleSoftInput(0,
> InputMethodManager.SHOW_IMPLICIT);
>                 }
>             }
>         }, 100);
>     }
>
> On Sep 2, 5:06 pm, sblantipodi  wrote:
>
>
>
>
>
>
>
> > it doesn't works.
> > can't understand how to do that. -_-
>
> > On Sep 2, 3:20 pm, TreKing  wrote:
>
> > > On Fri, Sep 2, 2011 at 8:01 AM, sblantipodi 
> > > wrote:
>
> > > > can't understand why something as simple should became as difficult.
>
> > > That is an unfortunate reality of software development =P
>
> > > -
> > > 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Alert input must show the keyboard.

2011-09-01 Thread TreKing
On Thu, Sep 1, 2011 at 3:43 PM, sblantipodi wrote:

> The EditText inside the dialog itself is automatically focused when I call
> AlertDialog.show(), but the soft keyboard is not automatically shown.
>

Then try removing focus from it first, then requesting it back.

-
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Alert input must show the keyboard.

2011-09-01 Thread TreKing
On Thu, Sep 1, 2011 at 5:50 PM, sblantipodi wrote:

> how to remove it?


Request focus on something else first?

-
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Alert input must show the keyboard.

2011-09-02 Thread TreKing
On Fri, Sep 2, 2011 at 5:15 AM, sblantipodi wrote:

> this is not the way.
> if you search on internet this is a commond problem but I can't find
> a solution
>

Create an Activity themed like a dialog instead of an AlertDialog? I'm just
going to keep throwing suggestions at you until something works =P

-
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Alert input must show the keyboard.

2011-09-02 Thread TreKing
On Fri, Sep 2, 2011 at 8:01 AM, sblantipodi wrote:

> can't understand why something as simple should became as difficult.


That is an unfortunate reality of software development =P

-
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en