ビューを使用したアプリを作成しましたが、ビューをタッチしたときにキーボードがポップアップするようにしました。つまり、ユーザー名、住所、電話の表示次のコード行を使用しましたが、アンドロイドでポップキーボード
1)getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
これは動作しませんし、私はこれで私を助けてください、あまりにも次のことを試してみましたませんが、何の助け
((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE))
.showSoftInput(username, InputMethodManager.SHOW_FORCED);
。 This is the image of my custom view app
私のEditText XMLは、ここに
<com.github.florent37.materialtextfield.MaterialTextField
android:layout_below="@+id/view"
app:mtf_image="@drawable/phon" android:id="@+id/view3">
<EditText android:layout_width="wrap_content"
android:layout_height="40dp"
android:id="@+id/phoneNo"
android:focusableInTouchMode="true"
android:textSize="18sp"
android:inputType="phone"
android:background="@drawable/phone"
android:hint="Phone Number" />
</com.github.florent37.materialtextfield.MaterialTextField>
レイアウトでEditTextを使用していますか: –
はい編集テキストを使用しています。 –
はあなたのeditTextユーザー名ですか? –