You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
849 B
33 lines
849 B
package edu.hzuapps.androidlabs.watchtv;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.widget.VideoView;
|
|
|
|
public class MyVideoView extends VideoView {
|
|
public MyVideoView(Context context) {
|
|
super(context);
|
|
}
|
|
|
|
public MyVideoView(Context context, AttributeSet attrs) {
|
|
super(context, attrs);
|
|
}
|
|
|
|
public MyVideoView(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
super(context, attrs, defStyleAttr);
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
|
int width = getDefaultSize(0, widthMeasureSpec);
|
|
int height = getDefaultSize(0, heightMeasureSpec);
|
|
setMeasuredDimension(width,height);
|
|
|
|
}
|
|
|
|
|
|
}
|