Lines Matching refs:height
158 int height = getDefaultSize(mVideoHeight, heightMeasureSpec);
169 height = heightSpecSize;
172 if ( mVideoWidth * height < width * mVideoHeight ) {
174 width = height * mVideoWidth / mVideoHeight;
175 } else if ( mVideoWidth * height > width * mVideoHeight ) {
177 height = width * mVideoHeight / mVideoWidth;
180 // only the width is fixed, adjust the height to match aspect ratio if possible
182 height = width * mVideoHeight / mVideoWidth;
183 if (heightSpecMode == MeasureSpec.AT_MOST && height > heightSpecSize) {
185 height = heightSpecSize;
188 // only the height is fixed, adjust the width to match aspect ratio if possible
189 height = heightSpecSize;
190 width = height * mVideoWidth / mVideoHeight;
196 // neither the width nor the height are fixed, try to use actual video size
198 height = mVideoHeight;
199 if (heightSpecMode == MeasureSpec.AT_MOST && height > heightSpecSize) {
200 // too tall, decrease both width and height
201 height = heightSpecSize;
202 width = height * mVideoWidth / mVideoHeight;
205 // too wide, decrease both width and height
207 height = width * mVideoHeight / mVideoWidth;
213 setMeasuredDimension(width, height);
402 public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
864 final int height = getHeight() - getPaddingTop() - getPaddingBottom();
866 mSubtitleWidget.setSize(width, height);