Methods Summary |
---|
public boolean | addNewSlide()Add a new slide to the end of message.
int position = mModel.size();
return addNewSlide(position);
|
public boolean | addNewSlide(int position)Add a new slide at the specified position in the message.
int size = mModel.size();
if (size < MAX_SLIDE_NUM) {
SlideModel slide = new SlideModel(mModel);
TextModel text = new TextModel(
mContext, ContentType.TEXT_PLAIN, "text_" + size + ".txt",
mModel.getLayout().getTextRegion());
slide.add(text);
mModel.add(position, slide);
return true;
} else {
Log.w(TAG, "The limitation of the number of slides is reached.");
return false;
}
|
public void | changeAudio(int position, android.net.Uri newAudio)
AudioModel audio = new AudioModel(mContext, newAudio);
SlideModel slide = mModel.get(position);
slide.add(audio);
slide.updateDuration(audio.getDuration());
|
public void | changeDuration(int position, int dur)
if (dur >= 0) {
mModel.get(position).setDuration(dur);
}
|
public void | changeImage(int position, android.net.Uri newImage)
mModel.get(position).add(new ImageModel(
mContext, newImage, mModel.getLayout().getImageRegion()));
|
public void | changeLayout(int layout)
mModel.getLayout().changeTo(layout);
|
public void | changeText(int position, java.lang.String newText)
if (newText != null) {
SlideModel slide = mModel.get(position);
TextModel text = slide.getText();
if (text == null) {
text = new TextModel(mContext,
ContentType.TEXT_PLAIN, "text_" + position + ".txt",
mModel.getLayout().getTextRegion());
text.setText(newText);
slide.add(text);
} else if (!newText.equals(text.getText())) {
text.setText(newText);
}
}
|
public void | changeVideo(int position, android.net.Uri newVideo)
VideoModel video = new VideoModel(mContext, newVideo,
mModel.getLayout().getImageRegion());
SlideModel slide = mModel.get(position);
slide.add(video);
slide.updateDuration(video.getDuration());
|
public com.android.mms.model.RegionModel | getImageRegion()
return mModel.getLayout().getImageRegion();
|
public com.android.mms.model.RegionModel | getTextRegion()
return mModel.getLayout().getTextRegion();
|
public void | moveSlideDown(int position)
mModel.add(position + 1, mModel.remove(position));
|
public void | moveSlideUp(int position)
mModel.add(position - 1, mModel.remove(position));
|
public void | removeAllSlides()Remove all slides.
while (mModel.size() > 0) {
removeSlide(0);
}
|
public boolean | removeAudio(int position)
return mModel.get(position).removeAudio();
|
public boolean | removeImage(int position)
return mModel.get(position).removeImage();
|
public void | removeSlide(int position)Remove one slide.
mModel.remove(position);
|
public boolean | removeText(int position)Remove the text of the specified slide.
return mModel.get(position).removeText();
|
public boolean | removeVideo(int position)
return mModel.get(position).removeVideo();
|