首页 > 代码库 > Android KK平台,联系人列表#组置于A~Z之前
Android KK平台,联系人列表#组置于A~Z之前
修改文件ContactLocaleUtils.java两处
(Path:packages/contactsprovider/src/com/android/providers/contacts)
1. 函数public ContactLocaleUtilsBase(Locale locale)结尾处
...
mAlphabeticIndexBucketCount = mAlphabeticIndex.getBucketCount();
//add
//mNumberBucketIndex = mAlphabeticIndexBucketCount - 1;
mNumberBucketIndex = 0;
2. 函数public int getBucketIndex(String name)结尾处
...
final int bucket = mAlphabeticIndex.getBucketIndex(name);
if (bucket < 0) {
return -1;
}
//add
if(bucket == 0){ //将特殊符号联系人归类到#组,若不需要请去掉
return mNumberBucketIndex;
}
//if (bucket >= mNumberBucketIndex) {
// return bucket + 1;
//}
//return bucket;
return bucket+1;
(Path:packages/contactsprovider/src/com/android/providers/contacts)
1. 函数public ContactLocaleUtilsBase(Locale locale)结尾处
...
mAlphabeticIndexBucketCount = mAlphabeticIndex.getBucketCount();
//add
//mNumberBucketIndex = mAlphabeticIndexBucketCount - 1;
mNumberBucketIndex = 0;
2. 函数public int getBucketIndex(String name)结尾处
...
final int bucket = mAlphabeticIndex.getBucketIndex(name);
if (bucket < 0) {
return -1;
}
//add
if(bucket == 0){ //将特殊符号联系人归类到#组,若不需要请去掉
return mNumberBucketIndex;
}
//if (bucket >= mNumberBucketIndex) {
// return bucket + 1;
//}
//return bucket;
return bucket+1;
Android KK平台,联系人列表#组置于A~Z之前
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。