Deprecated: android:capitalize - Capitalize Text in TextView, using android:capitalize

Deprecated: How to Capitalize Text in a TextView, using android:capitalize

android:capitalize was added in API Level 1
android:capitalize was deprecated in API level 3
 use android: inputType instead or android:textAllCaps

android:capitalize will capitalize letters, words, or sentences, by default, while typing. 


1. Create an Android project, if you don't already have one.


2. Add a TextView.

3. In the main.xml file, add the below line

  <TextView
    ....
      android:capitalize = "characters"
  />
 
4. To capitalize(by default):

- the first word of each sentence - use:  
android:capitalize = "sentences"
- the first letter of every word - use: 
android: capitalize = "words"
- every characters - use: 
android: capitalize = "characters"

5. Compile and run!

Related Articles
Resources: