Q:

How to get all text selected on each click in my app

I am newbie to Android Development. I have created a helloandroidappwithlogin 
its completely working fine but just one thing where I am stuck is how to get the text selected 
I have set the Username slot as Username So if a user tap/click on it, it should the username and start writing his username 
to make things easy to understand i am attaching a screenshot

this is what I want to achieve

A:

You can try like this
android:selectAllOnFocus="true"

