// Path: DMZJ/proj.android/src/com/component/impl/VideoView.java
// public interface OnFinishListener {
// 	public void onVideoFinish();
// }


import android.app.Activity;
import android.content.res.AssetFileDescriptor;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.AbsoluteLayout;
import com.component.impl.VideoView.OnFinishListener;
		int margin = 0;
		if ((float) width / height > 2.0 / 3.0) {
			// 左右留边
			margin = (int) ((width - ((2.0 * height) / 3.0)) / 2.0);
			layout.setPadding(margin, 0, margin, 0);
		} else if ((float) width / height < 2.0 / 3.0) {
			// 上下留边
			margin = (int) ((height - ((3.0 * width) / 2.0)) / 2.0);
			layout.setPadding(0, margin, 0, margin);
		}

		context.addContentView(layout, new LayoutParams(
				LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
	}

	public void play(final String filename, final boolean skipable) {
		context.runOnUiThread(new Runnable() {
			@Override
			public void run() {
				try {
					finished = false;
					video = new VideoView(context);
					video.setSkipable(skipable);
					AssetFileDescriptor afd = context.getAssets().openFd(
							filename);
					video.setVideo(afd);

					layout.addView(video);
					video.setZOrderMediaOverlay(true);

// Path: DMZJ/proj.android/src/com/component/impl/VideoView.java
// public interface OnFinishListener {
// 	public void onVideoFinish();
// }


// Path: DMZJ/proj.android/src/com/component/impl/VideoViewCtrl.java
import android.app.Activity;
import android.content.res.AssetFileDescriptor;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.AbsoluteLayout;
import com.component.impl.VideoView.OnFinishListener;

		int margin = 0;
		if ((float) width / height > 2.0 / 3.0) {
			// 左右留边
			margin = (int) ((width - ((2.0 * height) / 3.0)) / 2.0);
			layout.setPadding(margin, 0, margin, 0);
		} else if ((float) width / height < 2.0 / 3.0) {
			// 上下留边
			margin = (int) ((height - ((3.0 * width) / 2.0)) / 2.0);
			layout.setPadding(0, margin, 0, margin);
		}

		context.addContentView(layout, new LayoutParams(
				LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
	}

	public void play(final String filename, final boolean skipable) {
		context.runOnUiThread(new Runnable() {
			@Override
			public void run() {
				try {
					finished = false;
					video = new VideoView(context);
					video.setSkipable(skipable);
					AssetFileDescriptor afd = context.getAssets().openFd(
							filename);
					video.setVideo(afd);

					layout.addView(video);
					video.setZOrderMediaOverlay(true);

					video.setOnFinishListener(new OnFinishListener() {