The contacts at the beginning of the Android special symbol are merged into the "#"

Source: Internet
Author: User

In the Peopleactivity interface. The display location of the contact is determined by the first character of its display name.


The contacts at the beginning of the number are displayed under the "#" header.


The Chinese and English contacts will appear under "A" to "Z".
Contacts that begin with a symbol do not have a corresponding header. is displayed at the top of the. How do I change it to show them under the ' # ' sign?
The following methods can be displayed below "#" (for symbols in general ASCII encoding)


JB Version Number:
Contactsprovider2.java (packages\providers\contactsprovider\src\com\android\providers\contacts)
In the Getfastscrollingindexextras function, for example, the following statement:
if (title = = null) {
title = "";
}
Change to: if (title = = null) {
title = "#";
}

KK Version number:
Contactlocaleutils.java (alps\packages\providers\contactsprovider\src\com\android\providers\contacts)
Changes
Contactlocaleutilsbase Inner class
public int Getbucketlabel (String name) {
Change the following code

final int bucket = malphabeticindex.getbucketindex (name);
if (Bucket < 0) {
return-1;
}
Add
if (bucket = = 0) {
return mnumberbucketindex; The return mnumberbucketindex is placed inside the #. Suppose you want to put the sign behind the #, return mnumberbucketindex+1
}
Add End
if (bucket >= mnumberbucketindex) {
return bucket + 1;
}
return bucket;

The contacts at the beginning of the Android special symbol are merged into the "#"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.