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

 

 

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);
}
posted @ 2016-10-04 00:43  Fei非非  阅读(321)  评论(0编辑  收藏  举报