FileDocCategorySizeDatePackage
SlideListItemView.javaAPI DocAndroid 1.5 API4899Wed May 06 22:42:46 BST 2009com.android.mms.ui

SlideListItemView

public class SlideListItemView extends android.widget.LinearLayout implements SlideViewInterface
A simplified view of slide in the slides list.

Fields Summary
private static final String
TAG
private android.widget.TextView
mTextPreview
private android.widget.ImageView
mImagePreview
private android.widget.TextView
mAttachmentName
private android.widget.ImageView
mAttachmentIcon
Constructors Summary
public SlideListItemView(android.content.Context context)


       
        super(context);
    
public SlideListItemView(android.content.Context context, android.util.AttributeSet attrs)

        super(context, attrs);
    
Methods Summary
protected voidonFinishInflate()

        mTextPreview = (TextView) findViewById(R.id.text_preview);
        mTextPreview.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
        mImagePreview = (ImageView) findViewById(R.id.image_preview);
        mAttachmentName = (TextView) findViewById(R.id.attachment_name);
        mAttachmentIcon = (ImageView) findViewById(R.id.attachment_icon);
    
public voidpauseAudio()

        // TODO Auto-generated method stub

    
public voidpauseVideo()

        // TODO Auto-generated method stub

    
public voidreset()

        // TODO Auto-generated method stub
    
public voidseekAudio(int seekTo)

        // TODO Auto-generated method stub

    
public voidseekVideo(int seekTo)

        // TODO Auto-generated method stub

    
public voidsetAudio(android.net.Uri audio, java.lang.String name, java.util.Map extras)

        if (name != null) {
            mAttachmentName.setText(name);
            mAttachmentIcon.setImageResource(R.drawable.ic_mms_music);
        } else {
            mAttachmentName.setText("");
            mAttachmentIcon.setImageDrawable(null);
        }
    
public voidsetImage(java.lang.String name, android.graphics.Bitmap bitmap)

        if (null == bitmap) {
            bitmap = BitmapFactory.decodeResource(getResources(),
                    R.drawable.ic_missing_thumbnail_picture);
        }
        mImagePreview.setImageBitmap(bitmap);
    
public voidsetImageRegionFit(java.lang.String fit)

        // TODO Auto-generated method stub
    
public voidsetImageVisibility(boolean visible)

        // TODO Auto-generated method stub
    
public voidsetText(java.lang.String name, java.lang.String text)

        mTextPreview.setText(text);
        mTextPreview.setVisibility(TextUtils.isEmpty(text) ? View.GONE : View.VISIBLE);
    
public voidsetTextVisibility(boolean visible)

        // TODO Auto-generated method stub
    
public voidsetVideo(java.lang.String name, android.net.Uri video)

        if (name != null) {
            mAttachmentName.setText(name);
            mAttachmentIcon.setImageResource(R.drawable.movie);
        } else {
            mAttachmentName.setText("");
            mAttachmentIcon.setImageDrawable(null);
        }

        MediaPlayer mp = new MediaPlayer();
        try {
            mp.setDataSource(mContext, video);
            mImagePreview.setImageBitmap(mp.getFrameAt(1000));
        } catch (IOException e) {
            Log.e(TAG, "Unexpected IOException.", e);
        } finally {
            mp.release();
        }
    
public voidsetVideoVisibility(boolean visible)

        // TODO Auto-generated method stub
    
public voidsetVisibility(boolean visible)

        // TODO Auto-generated method stub
    
public voidstartAudio()

        // Playing audio is not needed in this view.
    
public voidstartVideo()

        // Playing audio is not needed in this view.
    
public voidstopAudio()

        // Stopping audio is not needed in this view.
    
public voidstopVideo()

        // Stopping video is not needed in this view.