Methods Summary |
---|
protected void | onFinishInflate()
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 void | pauseAudio()
// TODO Auto-generated method stub
|
public void | pauseVideo()
// TODO Auto-generated method stub
|
public void | reset()
// TODO Auto-generated method stub
|
public void | seekAudio(int seekTo)
// TODO Auto-generated method stub
|
public void | seekVideo(int seekTo)
// TODO Auto-generated method stub
|
public void | setAudio(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 void | setImage(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 void | setImageRegionFit(java.lang.String fit)
// TODO Auto-generated method stub
|
public void | setImageVisibility(boolean visible)
// TODO Auto-generated method stub
|
public void | setText(java.lang.String name, java.lang.String text)
mTextPreview.setText(text);
mTextPreview.setVisibility(TextUtils.isEmpty(text) ? View.GONE : View.VISIBLE);
|
public void | setTextVisibility(boolean visible)
// TODO Auto-generated method stub
|
public void | setVideo(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 void | setVideoVisibility(boolean visible)
// TODO Auto-generated method stub
|
public void | setVisibility(boolean visible)
// TODO Auto-generated method stub
|
public void | startAudio()
// Playing audio is not needed in this view.
|
public void | startVideo()
// Playing audio is not needed in this view.
|
public void | stopAudio()
// Stopping audio is not needed in this view.
|
public void | stopVideo()
// Stopping video is not needed in this view.
|