91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.07MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-08-19
  • 語言: 其他
  • 標簽: 便簽??源代碼??

資源簡介

如果你是安卓開發的新手,你需要了解記事本是如何生成的,那你不妨看看這個代碼,詳細

資源截圖

代碼片段和文件信息

/*
?*?Copyright?(c)?2010-2011?The?MiCode?Open?Source?Community?(www.micode.net)
?*
?*?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?net.micode.notes.data;

import?android.content.Context;
import?android.database.Cursor;
import?android.provider.ContactsContract.CommonDataKinds.Phone;
import?android.provider.ContactsContract.Data;
import?android.telephony.PhoneNumberUtils;
import?android.util.Log;

import?java.util.HashMap;

public?class?Contact?{
????private?static?HashMap?sContactCache;
????private?static?final?String?TAG?=?“Contact“;

????private?static?final?String?CALLER_ID_SELECTION?=?“PHONE_NUMBERS_EQUAL(“?+?Phone.NUMBER
????+?“?)?AND?“?+?Data.MIMETYPE?+?“=‘“?+?Phone.CONTENT_ITEM_TYPE?+?“‘“
????+?“?AND?“?+?Data.RAW_CONTACT_ID?+?“?IN?“
????????????+?“(SELECT?raw_contact_id?“
????????????+?“?FROM?phone_lookup“
????????????+?“?WHERE?min_match?=?‘+‘)“;

????public?static?String?getContact(Context?context?String?phoneNumber)?{
????????if(sContactCache?==?null)?{
????????????sContactCache?=?new?HashMap();
????????}

????????if(sContactCache.containsKey(phoneNumber))?{
????????????return?sContactCache.get(phoneNumber);
????????}

????????String?selection?=?CALLER_ID_SELECTION.replace(“+“
????????????????PhoneNumberUtils.toCallerIDMinMatch(phoneNumber));
????????Cursor?cursor?=?context.getContentResolver().query(
????????????????Data.CONTENT_URI
????????????????new?String?[]?{?Phone.DISPLAY_NAME?}
????????????????selection
????????????????new?String[]?{?phoneNumber?}
????????????????null);

????????if?(cursor?!=?null?&&?cursor.moveToFirst())?{
????????????try?{
????????????????String?name?=?cursor.getString(0);
????????????????sContactCache.put(phoneNumber?name);
????????????????return?name;
????????????}?catch?(IndexOutOfBoundsException?e)?{
????????????????Log.e(TAG?“?Cursor?get?string?error?“?+?e.toString());
????????????????return?null;
????????????}?finally?{
????????????????cursor.close();
????????????}
????????}?else?{
????????????Log.d(TAG?“No?contact?matched?with?number:“?+?phoneNumber);
????????????return?null;
????????}
????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-01-09?23:25??MiCode-Notes-6cbf71d\
?????文件?????????122??2012-01-09?23:25??MiCode-Notes-6cbf71d\.gitignore
?????文件????????6090??2012-01-09?23:25??MiCode-Notes-6cbf71d\AndroidManifest.xml
?????文件???????10713??2012-01-09?23:25??MiCode-Notes-6cbf71d\NOTICE
?????文件????????1060??2012-01-09?23:25??MiCode-Notes-6cbf71d\README
?????目錄???????????0??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\
?????目錄???????????0??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\color\
?????文件?????????947??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\color\primary_text_dark.xml
?????文件?????????814??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\color\secondary_text_dark.xml
?????目錄???????????0??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\
?????文件????????3588??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\bg_btn_set_color.png
?????文件?????????245??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\bg_color_btn_mask.png
?????文件????????3533??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\call_record.png
?????文件????????3958??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\clock.png
?????文件????????3490??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\delete.png
?????文件?????????443??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\dropdown_icon.9.png
?????文件????????3524??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_blue.9.png
?????文件????????3565??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_green.9.png
?????文件????????3458??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_red.9.png
?????文件????????5100??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_title_blue.9.png
?????文件????????5627??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_title_green.9.png
?????文件????????5061??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_title_red.9.png
?????文件????????3866??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_title_white.9.png
?????文件????????6000??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_title_yellow.9.png
?????文件????????3441??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_white.9.png
?????文件????????3634??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\edit_yellow.9.png
?????文件????????3161??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\font_large.png
?????文件????????3097??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\font_normal.png
?????文件????????4101??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\font_size_selector_bg.9.png
?????文件????????3099??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\font_small.png
?????文件????????3188??2012-01-09?23:25??MiCode-Notes-6cbf71d\res\drawable-hdpi\font_super.png
............此處省略142個文件信息

評論

共有 條評論