Sunday, September 16, 2012
Android EditText Hint ( Default Text )
Do you like this story?

In Android if we set the default text using EditText.setText(""); function , then we should write some more code for best function.
So the solution is you can simply set the hint in the XML file. just check the code below.
<EditText
android:id="@+id/editTextTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/defTitle">
</EditText>
In the above code hint property sets the text.
android:hint="@string/defTitle"

This post was written by: s@beer
Subscribe to:
Post Comments (Atom)
0 Responses to “Android EditText Hint ( Default Text )”
Post a Comment