你好我的編輯文本面臨問題。Edittext首字母不自動大寫
的EDITTEXT的XML粘貼如下:
<EditText
android:id="@+id/edttxt_description_taskdescription"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/padding_large"
android:layout_marginTop="@dimen/margin_.5x"
android:background="@color/white"
android:lines="2"
android:gravity="top"
android:hint="@string/activity_task_description_name_hint"
android:imeOptions="actionDone"
android:singleLine="false"
android:inputType="textMultiLine|textCapSentences"
android:maxLength="85"
android:textSize="@dimen/text_16pixels" />
問題:我要自動大寫的EditText的第一個字母,但情況並非如此。請幫忙 !
注:我想要一個多行EditText。
其實這個代碼正在啓動字作爲資本你letter.Could請verify.Do你需要在一條線上的大寫字母每一個字每一個線? –
嘗試在inputType中添加textCapWords,如android:inputType =「textMultiLine | textCapWords | textCapSentences」。 – mubeen
我剛剛測試了你的代碼,它適用於我。你是否在你的代碼中編輯地修改EditText? – babadaba