PINYIN4J is only a Java open source class library, but it is often used in Android application development. Everyone has used the phone's address book, contacts of the search contact function, with pinyin4j can be achieved. Here I give you this example, using pinyin4j to implement the search contact function.First, a simple introduction to pinyin4j:Pinyin4j is a popular Java library, supporting the conversi
Create app widget Layout
You must define an initial layout for your app widget in the XML file and save it in the Res/layout directory of the project. You can use the view objects listed below to design your app widgets, but read and understand the appwidget design guide before starting the design.
If you are familiar with the layout, it is easy to create an app widget
1. appwidgetproviderinfo object:
Provides metadata (meta-data) for app widgets, including layout and update frequency. This object is defined in the Res/XML directory.
Xmlns: Android = "http://schemas.android.com/apk/res/android"
Android: minwidth = "294dp"
Android: minheight = "72dp"
, info.id);//info.id Contact ID Intent Intent = new Intent (); Intent.setaction (Intent.action_view); Intent.setdata (Personuri); StartActivity (Intent); 19. Call the system Camera app and store the captured photos Intent Intent = new Intent (mediastore.action_image_capture); Time = Calendar.getinstance (). Gettimeinmillis (); Intent.putextra (Mediastore.extra_output, Uri.fromfile (New File (environment.getexternalstoragedirectory). GetAbsolutePath () + "/tucue", Time + ". jpg")); Startact
There are many examples of online Android contact list, and the contact person is similar, because the project used the Contact List index function (the product to remove the letter item), but also good implementation, here I also share my implementation, lest later forget, that first look at the effect (demo at the end of it):The effect is so simple.Let's talk first: Add a pinyin field to the contact object first, and when you get the contact raw dat
Android custom controls Series 1: How to measure the widget size
The size (width and height) of the measurement control is the first step in the development of custom controls. Only after the size is determined can the painting be started (painting on the canvas using the canvas, the controls we use are actually drawn in this way ). Of course, this size needs to be calculated based on each part of the cont
= = Fullnamestyle.undefined | | name.fullnamestyle = fullnamestyle.western) Mlanguage.equals ("Hu")) {Final String joined = Msplitter.join (name, false, True); The middle parameter is false, which is the Boolean givennamefirst, which determines whether the givenname is at the front}else{Final String joined = Msplitter.join (name, True, true);}XT and EndUpdate.put (Structuredname.display_name, joined);Update.put (Structuredname.full_name_style, Unadjustedfullnamestyle);Update.put (Structurednam
Just record my own steps:Premise: I started with the Nokia 1202, black and white screen of the function machine;1. Put the card into the Android phone, and use the app Bao to export all the contact man-made vcf suffix file;2. Download itools, use it to connect iphone, import to iphone;To illustrate, I started with the Nokia 1202, the contacts are on the phone SIM card, the
Our phone Address book generally has this effect, such as:OK, this effect everyone has seen more, basically all of the Android phone address book has this effect. So let's see how this works out today.I. Overview 1. Page function analysisOn the whole, the left is a ListView, the right is a custom view, but the left side of the ListView is a little bit different from the one we normally use, that is, in the ListView I grouped all the
When the data is purged, action_package_data_cleared broadcasts are sent, and the broadcast is monitored and processed in the Widgetprovider. public static class Packagedataclearedreceiver extends Broadcastreceiver {private static final String Action_pack age_data_cleared = "Com.mediatek.intent.action.SETTINGS_PACKAGE_DATA_CLEARED"; public void OnReceive (context context, Intent Intent) {if (! Action_package_data_cleared.equals (Intent.getaction ())) {return; } Strin
Android provides the widget for the date and time.Date WidgetDatePicker and Datepickerdialog,datepickerdialog are a simple container for loading datepicker. There is a trigger method Ondatechangedlistener () and Ondatesetlistener () respectively.In this example, we set up two buttons and a textview when the button pops up Datepickdialog.Step 1: Some Java functions about time
Get an instance of the
The contact database of the Android system is very complex, not a simple table can be done.To simply query the user name and phone number, first to query the name, and then enter the name of the phone number, a name may correspond to multiple phone numbers: These is the Contacts rows that we'll retrieve. Static final string[] Contacts_summary_projection = new string[]{contactscontract.contacts._id, Con T
Android custom widget (1)
I recently attended a sharing meeting in Jinan. I felt deeply touched by the sharing spirit of the great gods. I would like to share some good things with you.
I cannot be a code farmer who only moves bricks to become a real programmer. Of course, I am a Yuan programmer. There are three types of programmers: Junior programmers, intermediate programmers, and senior programmers, I ca
1, Introduction Android Widget is a desktop plug-in, the Android system application development level has a special purpose. Appwidget is a way to embed the control of a process into a window of a process. The effect of the hover window is similar to the widget, but it is much more flexible than the
Android provides a standard toolbox of components that can be easily developed;
Specific See: http://developer.android.com/reference/android/widget/package-summary.html
Common controls:
TextView: Standard read-only text label;
EditText: Editable text input box;
Chronometer: a simple timer;
ListView: List entry in vertical direction;
Spinner: A single selec
How to get android mobile phone contacts and display them in letters (2)
The following describes how to categorize and display contacts with the same initials:
In the adapter implement SectionIndexer
In this way, the adapter must implement the following three interfaces:
@ Overridepublic Object [] getSections () {// collection of sections} @ Overridepublic int g
because Sim the card's contacts are saved in Sim Card of EF files, and each of these files is already fixed. Therefore, there is no way to add a field to save the collected information.Therefore, we can assume that we have the collection of information in the database, if we unplug the card, and then plug in, the collection information will inevitably be discarded (each boot will be re- SIM Card to import contact data), so this feature is meaningless!
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.