You can prevent soft keyboard to show by default either in code or
directly in Android.manifest:

1. In code (the results you get when searching the net always points
to a method that really does not work). I found this in the blog of
http://blog.oneguyinabasement.com/.

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

2. Add a tag to your activity in Android.manifest:

android:windowSoftInputMode="stateHidden"


On Aug 13, 11:15 pm, jb <[email protected]> wrote:
> Hi,
>
> I have an activity which loads a TableLayout. This is made up of
> TextView and EditView fields.
>
> When I run my app within the emulator the layout appears correctly
> (WITHOUT the soft keyboard appearing).
>
> When I run the app from a device (HTC Evo) and enter the activity the
> soft keyboard ALWAYS appears.
>
> I tried doing an OnFocusChange() for the first field in the layout and
> then doing:
>
> InputMethodManager imm =
> (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
> imm.hideSoftInputFromWindow(tvIndications.getWindowToken(), 0);
>
> It doesn't work. The soft keyboard always appears.
>
> Any suggestions?
>
> jb

-- 
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