开发者

obtain initials of Contact name

i want to according to alphabetical order to displayorder, i know in contact.apk have d开发者_JAVA百科one it,for example i add one Contact Person, i input "David",then "D" is be known and in the item appear "D",All with D beginning name as a group,so i want to know how to get the initials of Contact name ? if i used other language as Chinese,the problem is more hard.so i think i need to get the initials of the keyboard input,but i cannot how to get it .

http://i.6.cn/cvbnm/85/e6/6d/70303db1f8add5d69ffe3bbf3bfb259a.jpg

http://i.6.cn/cvbnm/80/d6/dc/8e79f5076d583ff37709336c06289f15.png


Why don't you just use String#subString to extract the first letter by yourself?


I have solved how to get the Chinese initials of Contact name, need to change Chinese to ASCII, I used a jar named pinyin4j, you can download http://pinyin4j.sourceforge.net/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜