Code example for ClipData

Methods: getIcon, getItemCount

0
    private void stash(ClipData clipping) {
        mClipping = clipping;
        if (mClipping != null) {
            setVisibility(View.VISIBLE);
            Bitmap icon = mClipping.getIcon();
//            mDescription.setText(mClipping.getDescription().getLabel()); 
            if (icon != null) {
                setImageBitmap(icon);
            } else { 
                if (mClipping.getItemCount() > 0) {
                    // TODO: figure out how to visualize every kind of ClipData! 
                    //mAltText.setText(mClipping.getItemAt(0).coerceToText(getContext())); 
                } 
            } 
        } else { 
            setVisibility(View.GONE);
        } 
    } 
 
    @Override 
    public boolean onTouchEvent(MotionEvent ev) {