I'm trying to use the QuickContactBadge
. I would like to get an effect like this:
![](https://d339vfjsz5zott.cloudfront.net/57_Contact-Badge/Contact-Badge_01.png)
But when I write this code:
QuickContactBadge badge = (QuickContactBadge) findViewById(R.id.badge_small);
badge.assignContactFromPhone("831-555-1212", true);
I don't see the badge but I am redirected to the Contact page.
Here is layout.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<QuickContactBadge
android:id="@+id/badge_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon" />
</LinearLayout>
How can I see the badge?