do like this in Apidemos:
<activity android:name=".app.CustomTitle"
android:label="@string/activity_custom_title"
android:windowSoftInputMode="stateVisible|adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.SAMPLE_CODE" />
</intent-filter>
</activity>
在2009-06-16,Bullo#88 <[email protected]> 写道:
>
>My activity contains an editable text view and I would like to
>automatically show the soft keyboard when the activity start.
>Anyone knows how to do it?
>
>I tried this:
>
>private void showSoftKeyboard() {
> textView.requestFocus();
> inputManager = (InputMethodManager) context.getSystemService
>(Context.INPUT_METHOD_SERVICE);
> inputManager.showSoftInputFromInputMethod(textView.getWindowToken(),
>InputMethodManager.SHOW_FORCED);
>}
>
>but it doesn't work...
>
>Thanks in advance for any help
>>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---