Saturday, February 22, 2014

action android QuickContactBadge inside function


assignContactFromPhone ("110", false)
This function is a Boolean value inside what ah?
Did not see it, I tried to run after what is true and false distinction<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
 / ** 
* Assign a contact based on a phone number. This should only be used when
* The contact's URI is not available, as an extra query will have to be
* Performed to lookup the URI based on the phone number.
*
* @ Param phoneNumber The phone number of the contact.
* @ Param lazyLookup If this is true, the lookup query will not be performed
* Until this view is clicked.
* /
public void assignContactFromPhone (String phoneNumber, boolean lazyLookup) {
mContactPhone = phoneNumber;
if (! lazyLookup) {
mQueryHandler.startQuery (TOKEN_PHONE_LOOKUP, null,
Uri.withAppendedPath (PhoneLookup.CONTENT_FILTER_URI, mContactPhone),
PHONE_LOOKUP_PROJECTION, null, null, null);
} Else {
mContactUri = null;
onContactUriChanged ();
}
}


In fact, the difference between true and false second argument is that point in time the query, when the time is true, calling this assignContactFromPhone function does not query directly returns a null of mContactUri, wait until the user clicks the control again when QuickContactBadge queries; When is false when calling this function that queries PhoneLookup.CONTENT_FILTER_URI, when I click on the longer queries.
So call the landlord doubt true or false without any reaction is normal.
Reply:
That was not what I set this parameter true or false in this place the basic functions of the program is simply no point in time affect the internal procedures executed queries will produce different effects?
Reply:
But feeling like I was not false efficiency will be more good ah?
Reply:
reference to the third floor IT_Transformers reply:
false but also feel like it would be more efficient is not good ah?

Pros and cons of it! Look at what the occasion.
false, then click directly to the display interface, the speed will be faster.

No comments:

Post a Comment