Beispiel #1
0
 @Override
 public void setVideoSampleAspectRatio(int videoSarNum, int videoSarDen) {
   if (videoSarNum > 0 && videoSarDen > 0) {
     mMeasureHelper.setVideoSampleAspectRatio(videoSarNum, videoSarDen);
     requestLayout();
   }
 }
Beispiel #2
0
 // --------------------
 // Layout & Measure
 // --------------------
 @Override
 public void setVideoSize(int videoWidth, int videoHeight) {
   if (videoWidth > 0 && videoHeight > 0) {
     mMeasureHelper.setVideoSize(videoWidth, videoHeight);
     requestLayout();
   }
 }
Beispiel #3
0
 @Override
 public void setVideoRotation(int degree) {
   mMeasureHelper.setVideoRotation(degree);
   setRotation(degree);
 }
Beispiel #4
0
 @Override
 protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
   mMeasureHelper.doMeasure(widthMeasureSpec, heightMeasureSpec);
   setMeasuredDimension(mMeasureHelper.getMeasuredWidth(), mMeasureHelper.getMeasuredHeight());
 }
Beispiel #5
0
 @Override
 public void setAspectRatio(int aspectRatio) {
   mMeasureHelper.setAspectRatio(aspectRatio);
   requestLayout();
 }