in my app when i login it goes to home page.when i am in home page if i click back button it goes to login page,but username and password is still there.What is the stander ed way to avoid this ?
Removing it after login, of course. As long as you think about "pages", that's the wrong metaphor. Think about activities instead (in the Android sense of the word).
Starting a new activity doesn't remove the credentials on the old one, you'll just end up with two login activities. Why don't you just finish the login activity after you're done with the login? Is there a point in keeping it around after a successful login?