paoservis / osmtracker-android

Automatically exported from code.google.com/p/osmtracker-android
GNU General Public License v3.0
0 stars 0 forks source link

Automaticly open Keyboad on textnote #124

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is just an idea for a minor usability enhancement:

When I tab on "Text-Note", a text-window opens. after that I have to manually 
open the keyboard before I can actually can enter a text. It would nice to skip 
this on devices without a hardware keyboard.

All the best

Original issue reported on code.google.com by imnother...@gmail.com on 24 Apr 2011 at 3:10

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for pointing that out. I'm not certain how to get the keyboard to show 
automatically. It may be that it will work if we set the focus to the text box.

I'll see what I can find.

- Paul.

Original comment by oshea.p...@gmail.com on 24 Apr 2011 at 5:54

GoogleCodeExporter commented 9 years ago
Hi,

input.requestFocus();
on the EditText didn't work in this case.

this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_AL
WAYS_VISIBLE);
within the AlertDialog.onStart() method didn't work either.

And adding an onFocusChangedListener that uses an InputMethodManager also 
didn't work:
        input.setOnFocusChangeListener(new View.OnFocusChangeListener() {
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                if (hasFocus) {
                    TextNoteDialog.this.inputMgr.showSoftInput(v, InputMethodManager.SHOW_FORCED);
                }
            }
        });

I found some sites saying that it is not possible within an AlertDialog and one 
has to create a custom Dialog for this case... I think we should check this.

best regards
Matthias

Original comment by matthias...@gmail.com on 27 Apr 2011 at 9:26