简体   繁体   中英

Android EditText doesn't show keyboard hint if use more than one inputType attribute

I'm trying to have an Edit text with keyboard hints and auotcorrection for words (such as when you write a message in whatsapp).

This is my code:

        <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" />

According with the documentation it should work but it doesn't. I've also tried using the deprecated android:autoText="true" .

I need all the functionallity specified in the InputType

Edit:

After some try I discovered that if I set only one attribute without problem but if I set all of what I need nothing work correctly.

Edit 2:

What I want to obtain is something like the Whatsapp editbox where you write your message.

Maybe it has to do with the input type, have you tried single combinations?

Using a combination of textAutoCorrect and textAutoComplete might not always work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM