开发者

how to remove default key word from emulater when user enter the text in edit text

how to remove default key word from e开发者_如何学JAVAmulater when user enter the text in edit text


I think you need to have a default value in edit text that should be changed when user enters some text, and if everything is removed that default text should come

In this case use that default text for hint property of that edit text

Suppose you want your default text Username

Use this code

<EditText
            android:id="id"
            android:layout_height="wrap_content"
            android:maxLines="1"
            android:lines="1"
            android:layout_width="fill_parent"
            android:textSize="11dp"
            android:background="@drawable/text_box"
            android:padding="5dp"
            android:hint="Enter Username here" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜