我有EditText,輸入類型是textNoSuggestions。用數字鍵盤改變鍵盤的文字板
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="5dp">
<EditText
android:id="@+id/firstName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Name"
android:inputType="textNoSuggestions" />
</android.support.design.widget.TextInputLayout>
我也有一個按鈕,在按鈕的onclick方法我試圖改變鍵盤的輸入type.This是源
final Button changeKeyboard = (Button) dialog.findViewById(R.id.change_keyboard);
changeKeyboard.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
firsName.setRawInputType(InputType.TYPE_CLASS_NUMBER);
}
});
它是一個可能改變在點擊按鈕時,鍵盤輸入型鍵盤顯示? 我怎麼能解決我的問題,謝謝大家
這似乎是一個獨特的問題,並因此搜索後,我找不到一個類似的問題。祝你好運,找到答案。 – Vucko