Google is your friend; be nice and visit him often.
A very quick search
using your question as the search term gave thousands of hits, the top link of which was this:
http://developer.android.com/guide/topics/ui/settings.html[
^]
So why didn't you do that?
In future, please do at least basic research yourself, and not waste your time or ours.