The reason why EditText does not display the prompt text hint may be that the font color of the hint is the same as the background color of the EditText. You need to set the color value android:textColorHint="@color/gray" .
<EditText android:id="@+id/ed_name" android:layout_width="match_parent" android:layout_height="80dp" android:background="@drawable/tv_bk" android:gravity="center" android:lineSpacingExtra="3dp" android:textColor="@color/black" android:textSize="25sp" android:hint="请输入姓名" android:textColorHint="@color/gray" android:inputType="number|numberDecimal" />
Android EditText does not display hint text hint
Guess you like
Origin blog.csdn.net/weixin_58159075/article/details/123811824
Recommended
Ranking