Android通讯录开发之通讯录联系人搜索功能最新实现 - CSDN博客
Android通讯录开发之通讯录联系人搜索功能最新实现
Android通讯录开发之通讯录联系人搜索功能最新实现
之前的有两篇博客介绍了如何解决通讯录搜索功能的问题,那些方法都是从网上搜集,然后经过自己整理试验之后的,但在项目测试人员给我反馈,似乎还是存在一些问题,比如一些简拼没能搜出,或者简拼的转换有了问题,主要是因为中文的转换为简拼还是有点麻烦的,不同的编码支持的汉字又不同,比如gb2312编码支持汉字6763个汉字,并且分为两级,一级汉字3755个,二级汉字3008个,还对这两级汉字进行了分区,一级汉字是按拼音排序,二级汉字按笔画排序,所以网上提供的一些方法并没有覆盖绝大部分的汉字,才会导致有些简拼无法转换的现象。所以我还是抛弃了之前的方法,因为还是无法满足实现简拼搜索的要求。
下面小巫提供另外一个工具类,是目前我负责的项目最新的实现
* Copyright (C) 2011 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the &License&);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an &AS IS& BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
package com.suntek.mobilemeeting.
import android.text.TextU
import android.util.L
import java.text.C
import java.util.ArrayL
import java.util.L
* An object to convert Chinese character to its corresponding pinyin string. For characters with
* multiple possible pinyin string, only one is selected according to collator. Polyphone is not
* supported in this implementation. This class is implemented to achieve the best runtime
* performance and minimum runtime resources with tolerable sacrifice of accuracy. This
* implementation highly depends on zh_CN ICU collation data and must be always synchronized with
* Currently this file is aligned to zh.txt in ICU 4.6
public class HanziToPinyin {
private static final String TAG = &HanziToPinyin&;
// Turn on this flag when we want to check internal data structure.
private static final boolean DEBUG =
* Unihans array.
* Each unihans is the first one within same pinyin when collator is zh_CN.
public static final char[] UNIHANS = {
'\u963f', '\u54ce', '\u5b89', '\u80ae', '\u51f9', '\u516b',
'\u6300', '\u6273', '\u90a6', '\u52f9', '\u9642', '\u5954',
'\u4f3b', '\u5c44', '\u8fb9', '\u706c', '\u618b', '\u6c43',
'\u51ab', '\u7676', '\u5cec', '\u5693', '\u5072', '\u53c2',
'\u4ed3', '\u64a1', '\u518a', '\u5d7e', '\u66fd', '\u66fe',
'\u5c64', '\u53c9', '\u8286', '\u8fbf', '\u4f25', '\u6284',
'\u8f66', '\u62bb', '\u6c88', '\u6c89', '\u9637', '\u5403',
'\u5145', '\u62bd', '\u51fa', '\u6b3b', '\u63e3', '\u5ddb',
'\u5205', '\u5439', '\u65fe', '\u9034', '\u5472', '\u5306',
'\u51d1', '\u7c97', '\u6c46', '\u5d14', '\u90a8', '\u6413',
'\u5491', '\u5446', '\u4e39', '\u5f53', '\u5200', '\u561a',
'\u6265', '\u706f', '\u6c10', '\u55f2', '\u7538', '\u5201',
'\u7239', '\u4e01', '\u4e1f', '\u4e1c', '\u543a', '\u53be',
'\u8011', '\u8968', '\u5428', '\u591a', '\u59b8', '\u8bf6',
'\u5940', '\u97a5', '\u513f', '\u53d1', '\u5e06', '\u531a',
'\u98de', '\u5206', '\u4e30', '\u8985', '\u4ecf', '\u7d11',
'\u4f15', '\u65ee', '\u4f85', '\u7518', '\u5188', '\u768b',
'\u6208', '\u7ed9', '\u6839', '\u522f', '\u5de5', '\u52fe',
'\u4f30', '\u74dc', '\u4e56', '\u5173', '\u5149', '\u5f52',
'\u4e28', '\u5459', '\u54c8', '\u548d', '\u4f44', '\u592f',
'\u8320', '\u8bc3', '\u9ed2', '\u62eb', '\u4ea8', '\u5677',
'\u53ff', '\u9f41', '\u4e6f', '\u82b1', '\u6000', '\u72bf',
'\u5ddf', '\u7070', '\u660f', '\u5419', '\u4e0c', '\u52a0',
'\u620b', '\u6c5f', '\u827d', '\u9636', '\u5dfe', '\u5755',
'\u5182', '\u4e29', '\u51e5', '\u59e2', '\u5658', '\u519b',
'\u5494', '\u5f00', '\u520a', '\u5ffc', '\u5c3b', '\u533c',
'\u808e', '\u52a5', '\u7a7a', '\u62a0', '\u625d', '\u5938',
'\u84af', '\u5bbd', '\u5321', '\u4e8f', '\u5764', '\u6269',
'\u5783', '\u6765', '\u5170', '\u5577', '\u635e', '\u808b',
'\u52d2', '\u5d1a', '\u5215', '\u4fe9', '\u5941', '\u826f',
'\u64a9', '\u5217', '\u62ce', '\u5222', '\u6e9c', '\u56d6',
'\u9f99', '\u779c', '\u565c', '\u5a08', '\u7567', '\u62a1',
'\u7f57', '\u5463', '\u5988', '\u57cb', '\u5ada', '\u7264',
'\u732b', '\u4e48', '\u5445', '\u95e8', '\u753f', '\u54aa',
'\u5b80', '\u55b5', '\u4e5c', '\u6c11', '\u540d', '\u8c2c',
'\u6478', '\u54de', '\u6bea', '\u55ef', '\u62cf', '\u8149',
'\u56e1', '\u56d4', '\u5b6c', '\u7592', '\u5a1e', '\u6041',
'\u80fd', '\u59ae', '\u62c8', '\u5b22', '\u9e1f', '\u634f',
'\u56dc', '\u5b81', '\u599e', '\u519c', '\u7fba', '\u5974',
'\u597b', '\u759f', '\u9ec1', '\u90cd', '\u5594', '\u8bb4',
'\u5991', '\u62cd', '\u7705', '\u4e53', '\u629b', '\u5478',
'\u55b7', '\u5309', '\u4e15', '\u56e8', '\u527d', '\u6c15',
'\u59d8', '\u4e52', '\u948b', '\u5256', '\u4ec6', '\u4e03',
'\u6390', '\u5343', '\u545b', '\u6084', '\u767f', '\u4eb2',
'\u72c5', '\u828e', '\u4e18', '\u533a', '\u5cd1', '\u7f3a',
'\u590b', '\u5465', '\u7a63', '\u5a06', '\u60f9', '\u4eba',
'\u6254', '\u65e5', '\u8338', '\u53b9', '\u909a', '\u633c',
'\u5827', '\u5a51', '\u77a4', '\u637c', '\u4ee8', '\u6be2',
'\u4e09', '\u6852', '\u63bb', '\u95aa', '\u68ee', '\u50e7',
'\u6740', '\u7b5b', '\u5c71', '\u4f24', '\u5f30', '\u5962',
'\u7533', '\u8398', '\u6552', '\u5347', '\u5c38', '\u53ce',
'\u4e66', '\u5237', '\u8870', '\u95e9', '\u53cc', '\u8c01',
'\u542e', '\u8bf4', '\u53b6', '\u5fea', '\u635c', '\u82cf',
'\u72fb', '\u590a', '\u5b59', '\u5506', '\u4ed6', '\u56fc',
'\u574d', '\u6c64', '\u5932', '\u5fd1', '\u71a5', '\u5254',
'\u5929', '\u65eb', '\u5e16', '\u5385', '\u56f2', '\u5077',
'\u51f8', '\u6e4d', '\u63a8', '\u541e', '\u4e47', '\u7a75',
'\u6b6a', '\u5f2f', '\u5c23', '\u5371', '\u6637', '\u7fc1',
'\u631d', '\u4e4c', '\u5915', '\u8672', '\u4eda', '\u4e61',
'\u7071', '\u4e9b', '\u5fc3', '\u661f', '\u51f6', '\u4f11',
'\u5401', '\u5405', '\u524a', '\u5743', '\u4e2b', '\u6079',
'\u592e', '\u5e7a', '\u503b', '\u4e00', '\u56d9', '\u5e94',
'\u54df', '\u4f63', '\u4f18', '\u625c', '\u56e6', '\u66f0',
'\u6655', '\u7b60', '\u7b7c', '\u5e00', '\u707d', '\u5142',
'\u5328', '\u50ae', '\u5219', '\u8d3c', '\u600e', '\u5897',
'\u624e', '\u635a', '\u6cbe', '\u5f20', '\u957f', '\u9577',
'\u4f4b', '\u8707', '\u8d1e', '\u4e89', '\u4e4b', '\u5cd9',
'\u5ea2', '\u4e2d', '\u5dde', '\u6731', '\u6293', '\u62fd',
'\u4e13', '\u5986', '\u96b9', '\u5b92', '\u5353', '\u4e72',
'\u5b97', '\u90b9', '\u79df', '\u94bb', '\u539c', '\u5c0a',
'\u6628', '\u5159', '\u9fc3', '\u9fc4', };
* Pinyin array.
* Each pinyin is corresponding to unihans of same
* offset in the unihans array.
public static final byte[][] PINYINS = {
71}, { 67,
71}, { 83,
/** First and last Chinese character with known Pinyin according to zh collation */
private static final String FIRST_PINYIN_UNIHAN = &\u963F&;
private static final String LAST_PINYIN_UNIHAN = &\u9FFF&;
private static final Collator COLLATOR = Collator.getInstance(Locale.CHINA);
private static HanziToPinyin sI
private final boolean mHasChinaC
public static class Token {
* Separator between target string for each source char
public static final String SEPARATOR = & &;
public static final int LATIN = 1;
public static final int PINYIN = 2;
public static final int UNKNOWN = 3;
public Token() {
public Token(int type, String source, String target) {
this.type =
this.source =
this.target =
* Type of this token, ASCII, PINYIN or UNKNOWN.
* Original string before translation.
* Translated string of source. For Han, target is corresponding Pinyin. Otherwise target is
* original string in source.
protected HanziToPinyin(boolean hasChinaCollator) {
mHasChinaCollator = hasChinaC
public static HanziToPinyin getInstance() {
synchronized (HanziToPinyin.class) {
if (sInstance != null) {
// Check if zh_CN collation data is available
final Locale locale[] = Collator.getAvailableLocales();
for (int i = 0; i & locale. i++) {
if (locale[i].equals(Locale.CHINA)) {
// Do self validation just once.
if (DEBUG) {
Log.d(TAG, &Self validation. Result: & + doSelfValidation());
sInstance = new HanziToPinyin(true);
Log.w(TAG, &There is no Chinese collator, HanziToPinyin is disabled&);
sInstance = new HanziToPinyin(false);
* Validate if our internal table has some wrong value.
* @return true when the table looks correct.
private static boolean doSelfValidation() {
char lastChar = UNIHANS[0];
String lastString = Character.toString(lastChar);
for (char c : UNIHANS) {
if (lastChar == c) {
final String curString = Character.toString(c);
int cmp = pare(lastString, curString);
if (cmp &= 0) {
Log.e(TAG, &Internal error in Unihan table. & + &The last string \&& + lastString
+ &\& is greater than current string \&& + curString + &\&.&);
lastString = curS
private Token getToken(char character) {
Token token = new Token();
final String letter = Character.toString(character);
token.source =
int offset = -1;
if (character & 256) {
token.type = Token.LATIN;
token.target =
cmp = pare(letter, FIRST_PINYIN_UNIHAN);
if (cmp & 0) {
token.type = Token.UNKNOWN;
token.target =
} else if (cmp == 0) {
token.type = Token.PINYIN;
offset = 0;
cmp = pare(letter, LAST_PINYIN_UNIHAN);
if (cmp & 0) {
token.type = Token.UNKNOWN;
token.target =
} else if (cmp == 0) {
token.type = Token.PINYIN;
offset = UNIHANS.length - 1;
token.type = Token.PINYIN;
if (offset & 0) {
int begin = 0;
int end = UNIHANS.length - 1;
while (begin &= end) {
offset = (begin + end) / 2;
final String unihan = Character.toString(UNIHANS[offset]);
cmp = pare(letter, unihan);
if (cmp == 0) {
} else if (cmp & 0) {
begin = offset + 1;
end = offset - 1;
if (cmp & 0) {
StringBuilder pinyin = new StringBuilder();
for (int j = 0; j & PINYINS[offset].length && PINYINS[offset][j] != 0; j++) {
pinyin.append((char) PINYINS[offset][j]);
token.target = pinyin.toString();
if (TextUtils.isEmpty(token.target)) {
token.type = Token.UNKNOWN;
token.target = token.
* Convert the input to a array of tokens. The sequence of ASCII or Unknown characters without
* space will be put into a Token, One Hanzi character which has pinyin will be treated as a
* Token. If these is no China collator, the empty token array is returned.
public ArrayList&Token& get(final String input) {
ArrayList&Token& tokens = new ArrayList&Token&();
if (!mHasChinaCollator || TextUtils.isEmpty(input)) {
// return empty tokens.
final int inputLength = input.length();
final StringBuilder sb = new StringBuilder();
int tokenType = Token.LATIN;
// Go through the input, create a new token when
// a. Token type changed
// b. Get the Pinyin of current charater.
// c. current character is space.
for (int i = 0; i & inputL i++) {
final char character = input.charAt(i);
if (character == ' ') {
if (sb.length() & 0) {
addToken(sb, tokens, tokenType);
} else if (character & 256) {
if (tokenType != Token.LATIN && sb.length() & 0) {
addToken(sb, tokens, tokenType);
tokenType = Token.LATIN;
sb.append(character);
Token t = getToken(character);
if (t.type == Token.PINYIN) {
if (sb.length() & 0) {
addToken(sb, tokens, tokenType);
tokens.add(t);
tokenType = Token.PINYIN;
if (tokenType != t.type && sb.length() & 0) {
addToken(sb, tokens, tokenType);
tokenType = t.
sb.append(character);
if (sb.length() & 0) {
addToken(sb, tokens, tokenType);
private void addToken(
final StringBuilder sb, final ArrayList&Token& tokens, final int tokenType) {
String str = sb.toString();
tokens.add(new Token(tokenType, str, str));
sb.setLength(0);
这个工具类用于将汉字转换为拼音,通过一个Token对象来存储转换过后的拼音和转换之前的字符串。
下面定义一个方法获取输入字符串获取全拼
package com.suntek.mobilemeeting.
import java.util.ArrayL
import com.suntek.mobilemeeting.utils.HanziToPinyin.T
* 获取汉字拼音
* @author 佚名
public class PinYin {
public static String getPinYin(String input) {
ArrayList&Token& tokens = HanziToPinyin.getInstance().get(input);
StringBuilder sb = new StringBuilder();
if (tokens != null && tokens.size() & 0) {
for (Token token : tokens) {
if (Token.PINYIN == token.type) {
sb.append(token.target);
sb.append(token.source);
return sb.toString().toLowerCase();
上面是实现获取全拼的实现,下面是获取中文简拼的实现
package com.suntek.mobilemeeting.
* 根据 GBK 汉字的 UNICODE 编码取得汉字的首字母
* @author zrq
public class UnicodeGBK2Alpha {
private final static String GBK2UNICODE = &YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJ&
+ &HHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPC&
+ &BZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZ&
+ &ZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZ&
+ &XYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXP&
+ &JBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCS&
+ &KDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZ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QGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJ&
+ &TJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHY&
+ &YXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYL&
+ &BLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJL&
+ &JXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQD&
+ &CYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHW&
+ &WKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJ&
public static int getUnicodeFromGBK(String text) {
int unicode = 0;
byte buff[] =
String str =
if (str == null || str.length() &= 0)
// 如果进入的串长度大于1,则只返回第一个字的Unicode值
if (str.length() & 1)
str = text.substring(0, 1);
// 取得字的Unicode值,其中buff[0],buff[1]为Unicode的标识,而buff[3]为Unicode值的高位字节,buff[2]为Unicode值的低位字节
// buff = str.getBytes ( &Unicode& ); //
// 不用直接用&Unicode&,因为有的JRE环境下可能高低位会相反不统一,因此使用&UnicodeLittle&则会统一要求低位在前,相反&UnicodeBig&则是统一要求高位在前
buff = str.getBytes(&UnicodeLittle&);
unicode = (((int) (buff[3]) && 8) & 0xff00)
+ ((int) (buff[2]) & 0x00ff);
} catch (Exception e) {
e.printStackTrace();
* 根据输入的源串(中文或中西文混合)返回其拼音首字母,以小写返回,如果首字符非拼音字母,则统一返回&&
* @param str
public static String getFirstCharOfString(String str) {
String firstchar = &&;
int unicode = getUnicodeFromGBK(str);
if (unicode &= 19968 && unicode &= 40869)
firstchar = GBK2UNICODE.substring(unicode - 19968,
unicode - 19968 + 1);
return firstchar.toLowerCase();
* 根据输入的源串(中文或中西文混合)返回其拼音首字母串,如果中间有非字母符号则保留
* @param str
public static String getSimpleCharsOfString(String str) {
String chars = &&;
String firstchar = &&;
if (str == null)
for (int i = 0; i & str.length(); i++) {
firstchar = getFirstCharOfString(String.valueOf(str.charAt(i)));
if (firstchar.length() &= 0)
firstchar = String.valueOf(str.charAt(i));
* 根据输入的源串(中文或中西文混合)返回其拼音首字母串,如果中间有非字母符号则保留,但,如果中间有空格则&吃&掉
* @param str
public static String getSimpleCharsOfStringByTrim(String str) {
String chars = &&;
String firstchar = &&;
if (str == null)
for (int i = 0; i & str.length(); i++) {
firstchar = getFirstCharOfString(String.valueOf(str.charAt(i)));
if (firstchar.length() &= 0) {
if (str.charAt(i) != ' ')
firstchar = String.valueOf(str.charAt(i));
这个工具类是我目前实现最好效果的一个,我暂时还没有发现太多问题,基本上能够用。
下面是我修改过后的搜索方法
* 按号码-拼音搜索联系人
* @param str
public static ArrayList&Contact& search(final String str,
final ArrayList&Contact& allContacts) {
ArrayList&Contact& contactList = new ArrayList&Contact&();
// 如果搜索条件以0 1 +开头则按号码搜索
if (str.startsWith(&0&) || str.startsWith(&1&) || str.startsWith(&+&)) {
for (Contact contact : allContacts) {
if (contact.getNumber() != null && contact.getName() != null) {
if (contact.getNumber().contains(str)
|| contact.getName().contains(str)) {
contact.setGroup(str);
contactList.add(contact);
return contactL
// final ChineseSpelling finder = ChineseSpelling.getInstance();
// finder.setResource(str);
// final String result = finder.getSpelling();
// 先将输入的字符串转换为拼音
// final String result = PinYinUtil.getFullSpell(str);
final String result = PinYin.getPinYin(str);
for (Contact contact : allContacts) {
if (contains(contact, result)) {
contactList.add(contact);
return contactL
* 根据拼音搜索
* @param str
正则表达式
* @param pyName
* @param isIncludsive
搜索条件是否大于6个字符
public static boolean contains(Contact contact, String search) {
if (TextUtils.isEmpty(contact.getName()) || TextUtils.isEmpty(search)) {
boolean flag =
// 简拼匹配,如果输入在字符串长度大于6就不按首字母匹配了
if (search.length() & 6) {
// String firstLetters = FirstLetterUtil.getFirstLetter(contact
// .getName());
// 获得首字母字符串
String firstLetters = UnicodeGBK2Alpha
.getSimpleCharsOfString(contact.getName());
// String firstLetters =
// PinYinUtil.getFirstSpell(contact.getName());
// 不区分大小写
Pattern firstLetterMatcher = pile(&^& + search,
Pattern.CASE_INSENSITIVE);
flag = firstLetterMatcher.matcher(firstLetters).find();
if (!flag) { // 如果简拼已经找到了,就不使用全拼了
// 全拼匹配
// ChineseSpelling finder = ChineseSpelling.getInstance();
// finder.setResource(contact.getName());
// 不区分大小写
Pattern pattern2 = Pattern
.compile(search, Pattern.CASE_INSENSITIVE);
Matcher matcher2 = pattern2.matcher(PinYin.getPinYin(contact
.getName()));
flag = matcher2.find();
以上就是搜索模块的实现了,基本上实现中文、号码、全拼、简拼的模糊匹配,网上是很难找到关于通讯录的整体实现,小巫整理出来肯定能让有需要的人轻松很多。其实关于通讯录的实现,这并不是很完美的,肯定不同的项目有不同的需求,刚开始设计肯定很多考虑不全的,关于联系人的搜索完全可以直接到数据库搜索,无论是速度和准确性都有较好的保证。这篇博客只是介绍如何实现搜索功能罢了,关于搜索还涉及到线程同步的问题,如何保证速度和用户体验性,后续博客还会继续介绍。
本文已收录于以下专栏:
相关文章推荐
前段时间因为换工作的缘故又恰巧碰到国庆节,所以有段时间自己没有更新博客了,过完国庆到新公司报道,感觉还不错,就是现在住的地方离新公司有点远,地铁20站,伤不起啊,我每天早上7点多就要起床,然后屁颠屁颠...
在很多商业的App中都需要进行城市的选择,一般我们会对城市按首字母进行排序,以前的项目中也曾经遇到,今天拿来复习一下。思路如下:
1.首先我们需要一个包含全国各城市的数据库文件或Json,...
使用ContentResolver
在使用Google网页搜索功能时,只要输入几个字,就会在下方出现很多建议关键字。这次的范例,将以手机里的通讯录作为查询对象,并设计出一个类似建议的可能联系人。...
Android通讯录模糊匹配搜索实现(号码、首字母、简拼、全拼)
小巫在工作中碰到一个需求,要求实现通讯录联系人的搜索,获取联系人的方式有好几种,我都有点混...
这两天一直在写一个联系人界面,尝试实现按字母检索的功能。在查询了一些资料后,终于实现了这一功能,期间要感谢我导师和大牛华的一些帮助。废话不多说,先上效果图:
按住右侧的检索条可以跳到相应的位...
Android通讯录开发之解决快速搜索联系人线程同步问题
上一篇博客介绍的是如何实现搜索,在PhoneUtil中已经定义好了search方法,开发者直接拿来用就ok...
在android中,我们知道对于耗时操作要放到子线程中去处理,否则可能会阻塞主线程导致ANR,比较常见的耗时操作有数据库操作,网络通信等,对于此类操作我们需要进行异步处理。常见的异步处理有下面几种方式...
Android通讯录模糊查询搜索(号码,姓名,首字母简拼,全拼),批量选取联系人
公司最近的项目中遇到一个需求需要读取通讯录联系人,并需要支持对联系人的模糊查询及批量选取,网上...
根据数字,首字母,全拼,简拼实现数据检索
他的最新文章
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)