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

BasicSlideEditorView

public class BasicSlideEditorView extends android.widget.LinearLayout implements SlideViewInterface
This is a basic view to show and edit a slide.

Fields Summary
private static final String
TAG
private android.widget.ImageView
mImageView
private android.view.View
mAudioView
private android.widget.TextView
mAudioNameView
private android.widget.EditText
mEditText
private boolean
mOnTextChangedListenerEnabled
private OnTextChangedListener
mOnTextChangedListener
Constructors Summary
public BasicSlideEditorView(android.content.Context context)


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

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

        mImageView = (ImageView) findViewById(R.id.image);
        mAudioView = findViewById(R.id.audio);
        mAudioNameView = (TextView) findViewById(R.id.audio_name);
        mEditText = (EditText) findViewById(R.id.text_message);
        mEditText.addTextChangedListener(new TextWatcher() {
            public void beforeTextChanged(CharSequence s, int start, int count,
                    int after) {
                // TODO Auto-generated method stub
            }

            public void onTextChanged(CharSequence s, int start, int before,
                    int count) {
                if (mOnTextChangedListenerEnabled && (mOnTextChangedListener != null)) {
                    mOnTextChangedListener.onTextChanged(s.toString());
                }
            }

            public void afterTextChanged(Editable s) {
                // TODO Auto-generated method stub
            }
        });
    
public voidpauseAudio()

        // TODO Auto-generated method stub

    
public voidpauseVideo()

        // TODO Auto-generated method stub

    
public voidreset()

        mImageView.setImageDrawable(null);
        mAudioView.setVisibility(View.GONE);
        mOnTextChangedListenerEnabled = false;
        mEditText.setText("");
        mOnTextChangedListenerEnabled = true;
    
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)

        mAudioView.setVisibility(View.VISIBLE);
        mAudioNameView.setText(name);
    
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)

        // TODO Auto-generated method stub
    
public voidsetOnTextChangedListener(com.android.mms.ui.BasicSlideEditorView$OnTextChangedListener l)

        mOnTextChangedListener = l;
    
public voidsetText(java.lang.String name, java.lang.String text)

        mOnTextChangedListenerEnabled = false;
        if ((text != null) && !text.equals(mEditText.getText().toString())) {
            mEditText.setText(text);
            mEditText.setSelection(text.length());
        }
        mOnTextChangedListenerEnabled = true;
    
public voidsetTextVisibility(boolean visible)

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

        Bitmap bitmap = VideoAttachmentView.createVideoThumbnail(mContext, video);
        if (null == bitmap) {
            bitmap = BitmapFactory.decodeResource(getResources(),
                    R.drawable.ic_missing_thumbnail_video);
        }
        mImageView.setImageBitmap(bitmap);
    
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