Android: Contact operator dialog box pops up fast

2010-12-28  来源:本站原创  分类:Mobile  人气:137 

Shortcuts dialog box title refers to many places in the android, such as text entry, click on contact picture, it will pop up three operating options: phone, view, text messaging. To achieve this operation, primarily through QuickContactBadge this view.

On the use of this class, little information online. At first I take a detour, that this class is responsible for the dialog. Actually not, this class is just a normal picture view, click on it will pop up a dialog box mentioned here.

Therefore, we only need to add the interface view, and then set its properties in the code can be:

<QuickContactBadge
        android:id="@+id/photo"
        android:layout_width="54dip"
        android:layout_height="57dip"
        android:layout_marginLeft="5dip"
        android:background="#ffffff"
         />

The most important thing is the code to the view associated with a contact uri

QuickContactBadge mPhotoView;
        mPhotoView = (QuickContactBadge) findViewById(R.id.photo);
        mPhotoView.assignContactFromPhone("123", true);
        mPhotoView.setMode(QuickContact.MODE_SMALL);

As above, to complete.
If the associated contact is not in your address book, it will pop up hints to the address book dialog box .

相关文章
  • Android: Contact operator dialog box pops up fast 2010-12-28

    Shortcuts dialog box title refers to many places in the android, such as text entry, click on contact picture, it will pop up three operating options: phone, view, text messaging. To achieve this operation, primarily through QuickContactBadge this vi

  • Ie whether the browser against the password dialog box pops up 2010-09-06

    Use autocomplete = "off" property, in the ie browser may be prohibited if the password dialog box pops up. Cases: <input type="password" autocomplete="off" /> Only verified ie, no verification other browsers.

  • Android foundation - the dialog box and floating Activity - transfer 2010-09-15

    Android foundation - the dialog box and floating Activity - transfer In the learning process before, we already know, Android applications, the most commonly used development is based on the Activity screen display, but, in many cases we need to disp

  • New office2007. Docx document, open the Convert File dialog box pops up after a solution 2011-03-03

    I do not know is that non-standard word document open to change the template or other reasons, when I right mouse button to create a new word (. Docx) document, and then double-click to open, it will pop up a "Convert File" dialog, the "pla

  • ActiveX IE security dialog box pops up against the method 2011-05-14

    Html document in the head (can also be said to Head) increased <! - Saved from url = (0014) about: internet ->. For example: <! DOCTYPE HTML PUBLIC "- / / W3C / / DTD HTML 4.01 Frameset / / EN" " http://www.w3.org/TR/html4/frameset

  • Three kinds of pop-up dialog box 2010-04-12

    <Script language = "javascript"> function ale () (/ / This basically nothing to say, is a reminder of the dialog box pops up alert ("I can guarantee that you are using is to demonstrate a"); ) function firm () (/ / Use the dialog

  • Failure or visit a Web page dialog box pop-up download index.htm 2010-09-29

    Visit the download page index.htm failure or the dialog box pops up, or save the other things The solution: Built environment in general are due to negligence of staff. Checked and found that this phenomenon is due to change apache's httpd.conf file,

  • Android Development 06 - menus and dialog box (below) 2011-05-16

    Android Development 06 - menus and dialog box (below) 1. Progress dialog ProgressDialog can wheel and a progress bar shows progress, as ProgressDialog inherited from AlertDialog, so the progress of the dialog box can also add buttons. Usage examples

  • Android Notes - dialog box prompts 2010-06-27

    0. Chieftain prompted by: Toast toast = Toast.makeText (MsgSenderActivity.this, R.string.success, Toast.LENGTH_LONG); / / create a chieftain prompt object, the first parameter, need to display the Activity object, the second argument: the need to dis

  • Android progress bar in the dialog box 2010-11-30

    Look at the renderings: First need to create ProgressDialog object, then use the progress bar thread of control, the specific source code: package com.yarin.android.TestOnPDialog; import android.app.Activity; import android.app.ProgressDialog; import

  • Android - Click the button on the dialog box does not close the dialog box 2010-12-04

    Sometimes I may need to click the button did some testing, but do not want to close the second dialog box (click on any button on the system default is to close the dialog), treatment methods are as follows: In the click event to add the following co

  • Chapter I: Android entering the door (pop-up dialog box) 2011-01-04

    Effect: main.xml <?xml version="1.0" encoding="utf-8"?> <AbsoluteLayout android:id="@+id/widget0" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://

  • Android Development 06 - menus and dialog box (on) 2011-05-13

    Android Development 06 - menus and dialog box (on) 1. Menu 1) The options menu and sub menu in the foreground when the Activity work, press the appropriate menu option will pop up menu. This function is needed to achieve the developer compiled, if th

  • android custom dialog box 2010-11-26

    1, developers custom dialog box (with transparency) final Dialog searchDialog = new Dialog (this, R.style.dialog); WindowManager.LayoutParams lp = searchDialog.getWindow (). GetAttributes (); lp.alpha = 0.9f; searchDialog.getWindow (). setAttributes

  • window.showModalDialog the difference between a modal dialog box and window.open 2008-08-14

    1. Modal dialog parent window pops up a modal dialog box code is as follows window.showModalDialog(url,window, "help:no;scroll:no;resizable:no;status:0;dialogWidth:420px;dialogHeight:200px;center:yes" ); 1. Parameter 1 url, url behind you can ac

  • Open the MSN, QQ dialog box 2009-07-20

    The following is a dialog box with the hyperlink to open the temporary code QQ <html> <head> <style type="text/css"> <!-- .pAlert { font-family: " Tahoma "; font-size: 14px; color: #FF00FF; } .pInfo { font-family:

  • Open MSN, QQ dialog box 2010-03-13

    The following is a dialog box with a hyperlink to open the temporary code QQ <html> <head> <style type="text/css"> <!-- .pAlert { font-family: " Tahoma "; font-size: 14px; color: #FF00FF; } .pInfo { font-family: Ar

  • Flex close an Alert dialog box method: by PopUpManager class removePopUp () function 2010-03-08

    Flex close an Alert dialog box method: In general, the system pops up the Alert dialog box is closed without having to go to write a function, but is considered to be more familiar with the application PopUpManager class removePopUp () function, whic

  • 2 methods to achieve the dialog box 2010-08-25

    Replaced with button Spinner, pop-up dialog box, screenshots and code, see Annex! Implementation dialog box with a spinner public class SpinnerUseInArea extends Activity { Spinner mySpinner; private static final String[] countriesStr = { "111",

  • Dynamic pop-up dialog box 2010-09-14

    The dynamic of the custom dialog box Tone / / call the dialog box, Private void CreateDialog () ( View commentDialogView = LayoutInflater.from (context). Inflate ( R.layout.detail_dialog, GameDetail.this, false); FusionField.viewHandler.sendMessage (