Example usage for android.widget QuickContactBadge setImageResource

List of usage examples for android.widget QuickContactBadge setImageResource

Introduction

In this page you can find the example usage for android.widget QuickContactBadge setImageResource.

Prototype

@android.view.RemotableViewMethod(asyncImpl = "setImageResourceAsync")
public void setImageResource(@DrawableRes int resId) 

Source Link

Document

Sets a drawable as the content of this ImageView.

Usage

From source file:org.droid2droid.ui.contacts.AbstractSMSFragment.java

@TargetApi(11)
private void setDefaultImage(QuickContactBadge imageView) {
    if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
        imageView.setImageToDefault();/* w  w w  .  ja  v a 2 s . c o m*/
    } else {
        imageView.setImageResource(R.drawable.ic_contact_list_picture);
    }
}