pull/594/head
jhengazuki 3 months ago
parent 87653b2918
commit c8480ff205
  1. 4
      app/src/mobile/java/com/fongmi/android/tv/ui/activity/VideoActivity.java
  2. 1
      app/src/mobile/java/com/fongmi/android/tv/ui/adapter/DeviceAdapter.java

@ -1182,12 +1182,12 @@ public class VideoActivity extends BaseActivity implements Clock.Callback, Custo
}
private void checkHeight() {
if (isFullscreen() || isLand() || mPlayers.getVideoHeight() == 0) return;
if (isLand() || isFullscreen() || mPlayers.getVideoHeight() == 0) return;
mBinding.video.post(this::changeHeight);
}
private void changeHeight() {
int minHeight = ResUtil.getScreenHeight() / 4;
int minHeight = ResUtil.dp2px(150);
int maxHeight = ResUtil.getScreenHeight() * 2 / 3;
int parentWidth = ((View) mBinding.video.getParent()).getWidth();
int calculated = (int) (parentWidth * ((float) mPlayers.getVideoHeight() / mPlayers.getVideoWidth()));

@ -36,6 +36,7 @@ public class DeviceAdapter extends BaseDiffAdapter<Device, DeviceAdapter.ViewHol
@Override
public void clear() {
super.clear();
Device.delete();
}

Loading…
Cancel
Save