public class VideoHelper extends VideoView {
private int mVideoWidth;
private int mVideoHeight;
public VideoHelper(Context context){
super(context);
}
public VideoHelper(Context context,AttributeSet attrs) {
super(context, attrs);
}
public VideoHelper(Context context,AttributeSet attrs,int detStyle){
super(context,attrs,detStyle);
}
public void setVideoSize(int width,int height){
mVideoHeight=width;
mVideoHeight=height;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int width = getDefaultSize(mVideoWidth, widthMeasureSpec);
int height = getDefaultSize(mVideoHeight, heightMeasureSpec);
setMeasuredDimension(width, height);
}
}
안녕하세요 단순히 이미지뷰처럼 비디오뷰는 크기조절이안되더라구요!ㅠㅠ 그래서 구글링해서
찾아낸방법으로 한건데 저 코드대로하면 완전히 꽉차더라구요.. 뷰를 xml파일마다 크기 변동이있는데
아예다차버리니... 여기서 코드로 바꿔주면 xml도 바뀌던데 xml파일에 비디오뷰 크기잡아준대로 그 안에서만 꽉차게 할수있는방법없나요? 정말 어이없는질문일수도있지만 ㅠㅠ 부탁좀드릴게요!