Update video ui

pull/594/head
jhengazuki 3 months ago
parent 80b30eb391
commit b64a4972f6
  1. 3
      app/src/mobile/java/com/fongmi/android/tv/ui/activity/LiveActivity.java
  2. 3
      app/src/mobile/java/com/fongmi/android/tv/ui/activity/VideoActivity.java
  3. 31
      app/src/mobile/res/layout/view_control_live.xml
  4. 32
      app/src/mobile/res/layout/view_control_vod.xml

@ -768,9 +768,6 @@ public class LiveActivity extends BaseActivity implements CustomKeyDown.Listener
setMetadata();
setTrackVisible();
break;
case PlayerEvent.SIZE:
mBinding.control.size.setText(mPlayers.getSizeText());
break;
}
}

@ -869,6 +869,7 @@ public class VideoActivity extends BaseActivity implements Clock.Callback, Custo
if (isFullscreen()) return;
App.post(() -> mBinding.video.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT)), 50);
setRequestedOrientation(mPlayers.isPortrait() ? ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT : ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
mBinding.control.title.setVisibility(View.VISIBLE);
setRotate(mPlayers.isPortrait(), true);
mPlayers.setDanmakuSize(1.0f);
Util.hideSystemUI(this);
@ -881,6 +882,7 @@ public class VideoActivity extends BaseActivity implements Clock.Callback, Custo
if (!isFullscreen()) return;
setRequestedOrientation(isPort() ? ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT : ActivityInfo.SCREEN_ORIENTATION_FULL_USER);
App.post(() -> mBinding.episode.scrollToPosition(mEpisodeAdapter.getPosition()), 50);
mBinding.control.title.setVisibility(View.INVISIBLE);
mBinding.video.setLayoutParams(mFrameParams);
mPlayers.setDanmakuSize(0.8f);
setRotate(false, false);
@ -1159,7 +1161,6 @@ public class VideoActivity extends BaseActivity implements Clock.Callback, Custo
break;
case PlayerEvent.SIZE:
checkOrientation();
mBinding.control.size.setText(mPlayers.getSizeText());
break;
}
}

@ -19,32 +19,17 @@
android:scaleType="center"
android:src="@drawable/ic_control_back" />
<LinearLayout
<TextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingTop="12dp">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="16sp"
tools:text="CCTV-1" />
<TextView
android:id="@+id/size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="12sp"
tools:text="1920 x 1080" />
</LinearLayout>
android:ellipsize="marquee"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="16sp"
tools:text="CCTV-4K" />
<LinearLayout
android:layout_width="wrap_content"

@ -20,32 +20,18 @@
android:scaleType="center"
android:src="@drawable/ic_control_back" />
<LinearLayout
<TextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingTop="12dp">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="16sp"
tools:text="慶餘年第一季:第一集" />
<TextView
android:id="@+id/size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="12sp"
tools:text="1920 x 1080" />
</LinearLayout>
android:ellipsize="marquee"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="16sp"
android:visibility="invisible"
tools:text="慶餘年第一季:第一集" />
<LinearLayout
android:layout_width="wrap_content"

Loading…
Cancel
Save