1

我正在嘗試使用鍵盤提示和auotcorrection編輯文本(例如,當您在whatsapp中編寫消息時)。如果使用多個inputType屬性,則Android EditText不顯示鍵盤提示

這是我的代碼:

 <EditText 
     android:id="@+id/autoCompleteTextView1" 
     android:layout_width="match_parent" 
     android:layout_height="0dip" 
     android:layout_margin="20dp" 
     android:layout_weight="1" 
     android:background="@color/white" 
     android:ems="10" 
     android:inputType="textCapSentences|textMultiLine|textAutoCorrect|textAutoComplete" 
     android:scrollHorizontally="false" 
     android:hint="@string/note_content" 
     android:textColor="@color/black_text" /> 

documentation它應該工作,但它並沒有根據。 我也試過使用已棄用的android:autoText="true"

我需要在的inputType指定的所有functionallity

編輯:

經過一番嘗試我發現,如果我只設置一個屬性沒有問題,但如果我把所有的東西,我需要什麼工作正確。

編輯2:

我想獲得是一樣的東西,你寫你的消息的WhatsApp編輯框。

回答

0

也許它與輸入類型有關,你嘗試過單一組合嗎?

使用textAutoCorrect和textAutoComplete的組合可能並不總是工作

+0

只有textAutoComplete剛纔試了,它似乎正常工作 – 2014-09-30 16:09:11

+0

很抱歉,但它必須是多行的EditText – 2014-09-30 16:32:58

+0

安卓的inputType =「textCapSentences | textMultiLine | textAutoComplete」 – AndroidEnthusiast 2014-09-30 16:39:31