Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> Android KK平,聯系人列表#組置於A~Z之前

Android KK平,聯系人列表#組置於A~Z之前

編輯:關於Android編程

修改文件ContactLocaleUtils.java兩處
(Path:packages/contactsprovider/src/com/android/providers/contacts)
1. 函數public ContactLocaleUtilsBase(Locale locale)結尾處
...
mAlphabeticIndexBucketCount = mAlphabeticIndex.getBucketCount();
//add for put # group to first START
//mNumberBucketIndex = mAlphabeticIndexBucketCount - 1;
mNumberBucketIndex = 0;
//add for put # group to first END

2. 函數public int getBucketIndex(String name)結尾處
...
final int bucket = mAlphabeticIndex.getBucketIndex(name);
if (bucket < 0) {
return -1;
}
//add for put # group to first START
//if (bucket >= mNumberBucketIndex) {
// return bucket + 1;
//}
//return bucket;
return bucket+1;
//add for put # group to first END
  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved