android - text input type person name isn't working

前端 未结 4 1523
猫巷女王i
猫巷女王i 2021-01-20 15:03

In my android project I want a textfield of type personname where by default caps lock is activated, however, this code isn\'t working.



        
4条回答
  •  天命终不由人
    2021-01-20 15:43

    Use

    android:inputType="textPersonName|textCapWords"
    

    as using only "textPersonName" is not enough so name's first letters would be capitalized.

    Similarly with postal addresses:

    android:inputType="textPostalAddress|textCapSentences"
    

提交回复
热议问题