Sandhu
Sandhu

Reputation: 141

Hint is not showing in Edit text in lower api

EditText is not showing hint with the following XML code, it is working in some devices like mine is API 19, but not showing hint in android 2.3.3

 <EditText
        android:id="@+id/street1ET"
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:layout_weight="1"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="10dp"
        android:background="@drawable/custom_edittext"
        android:ems="10"
        android:gravity="center"
        android:hint="@string/street1"
        android:inputType="text"
        android:textAppearance="@android:style/TextAppearance.Small"
        android:textColor="#acacac" />

Upvotes: 1

Views: 732

Answers (2)

Ganesh Katikar
Ganesh Katikar

Reputation: 2690

Put below one line in EditText

android:textColorHint="@color/your_custom_color"

Enjoy!!!

Upvotes: 0

Himanshu Agarwal
Himanshu Agarwal

Reputation: 4683

Just add a single line and it will work, i.e android:ellipsize="start"

Also try to change hint color of EditText like this: android:textColorHint="@android:color/black" or relevant color code.

Upvotes: 2

Related Questions