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

SlideshowAttachmentView

public class SlideshowAttachmentView extends android.widget.LinearLayout implements SlideViewInterface
This class provides an embedded editor/viewer of slide-show attachment.

Fields Summary
private static final String
TAG
private android.widget.ImageView
mImageView
private android.widget.TextView
mTextView
Constructors Summary
public SlideshowAttachmentView(android.content.Context context)


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

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

        mImageView = (ImageView) findViewById(R.id.slideshow_image);
        mTextView = (TextView) findViewById(R.id.slideshow_text);
    
public voidpauseAudio()

        // TODO Auto-generated method stub

    
public voidpauseVideo()

        // TODO Auto-generated method stub

    
public voidreset()

        mImageView.setImageURI(null);
        mTextView.setText("");
    
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)

        // TODO Auto-generated method stub
    
public voidsetImage(java.lang.String name, android.graphics.Bitmap bitmap)

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

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

        mImageView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
    
public voidsetText(java.lang.String name, java.lang.String text)

        mTextView.setText(text);
    
public voidsetTextVisibility(boolean visible)

        mTextView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
    
public voidsetVideo(java.lang.String name, android.net.Uri video)

        MediaPlayer mp = new MediaPlayer();
        try {
            mp.setDataSource(mContext, video);
            mImageView.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()

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

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

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

        // TODO Auto-generated method stub