Skip to main content

Android How to Capitalize Every First letter of a Word in EditText

If you want to capitalise the first letter of every word in a EditText, assign android:inputType=”textCapWords” to EditText.



The same can be done programmatically also as shown below.

TextView mTxtCapitalize = findViewById(;
mTxtCapitalize.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_WORDS);

3 thoughts to “Android How to Capitalize Every First letter of a Word in EditText”

  1. Hey There. I found your blog using msn. This is
    a really well written article. I will make sure to bookmark it and come back to read more of your useful information. Thanks for the post.
    I will definitely comeback.

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Copy link
Powered by Social Snap