Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capitalizing first letter in android soft keyboard for edittext

Tags:

android

I have edit text which accept string. I want that the first letter of the string is capital for that I want to show keyboard with capital letter which default behavior of android.

like image 854
Vishal Mokal Avatar asked May 27 '13 12:05

Vishal Mokal


Video Answer


1 Answers

XML answer:

 android:inputType="textCapSentences"

If you need to use more than one input type follow this:

android:inputType="textCapSentences|textPersonName"

! Do not use below code because it is deprecated:

android:capitalize="sentences" <!-- deprecated -->
like image 105
Amsheer Avatar answered Oct 17 '22 04:10

Amsheer