码迷,mamicode.com
首页 > 其他好文 > 详细

QuickContactBadge--------------关联联系人-----------------------

时间:2016-10-04 01:40:46      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:

技术分享

 

 

xml--------------布局-----------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<QuickContactBadge
android:id="@+id/badge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/tx"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16dp"
android:text="我的偶像"/>
</LinearLayout>




MainActivity--------------------调用------------------------
QuickContactBadge badge;
@Override
public void onCreate(Bundle saveInstanceState){
super.onCreate(saveInstanceState);
setContentView(R.layout.quickcontactbadge);
badge=(QuickContactBadge) findViewById(R.id.badge);
badge.assignContactFromPhone("001-888888",false);
}

QuickContactBadge--------------关联联系人-----------------------

标签:

原文地址:http://www.cnblogs.com/ZeroMurder/p/5929976.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!