My EditText configured as follows won't show the hint:

<EditText
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="right"
    android:hint="The hint..."
    android:scrollHorizontally="true"
    android:singleLine="true" />

It works if I set android:gravity="left" or if I remove android:scrollHorizontally and android:singleLine attributes, which is not desirable. Any suggestions?


Solution 1:

using android:ellipsize="end" fixed it for me Weird bug !! (but Android has a lot of these weirdo bug)

Solution 2:

In Lollipop version the default text and hint text color is white for EditText. So we have to change like this in EditText

android:textColorHint="@color/grey"