Merge pull request #254 from okcaptain/dev

update
pull/259/head
okcaptain 2 years ago committed by GitHub
commit c0d893cd3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      app/src/leanback/java/com/fongmi/android/tv/ui/activity/VideoActivity.java
  2. 6
      app/src/leanback/res/drawable/shape_controller.xml
  3. 15
      app/src/leanback/res/drawable/shape_info.xml
  4. 2
      app/src/leanback/res/drawable/shape_text_activated.xml
  5. 3
      app/src/leanback/res/drawable/shape_text_focused.xml
  6. 2
      app/src/leanback/res/drawable/shape_text_normal.xml
  7. 4
      app/src/leanback/res/layout/view_control_seek.xml
  8. 45
      app/src/leanback/res/layout/view_control_vod.xml
  9. 1
      app/src/leanback/res/layout/view_widget_vod.xml

@ -746,13 +746,13 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List
}
private void showDisplayInfo() {
boolean infoVisible = isVisible(mBinding.widget.info);
mBinding.display.time.setVisibility(Setting.isDisplayTime() || infoVisible ? View.VISIBLE : View.GONE);
mBinding.display.netspeed.setVisibility(Setting.isDisplaySpeed() ? View.VISIBLE : View.GONE);
mBinding.display.time.setVisibility(Setting.isDisplayTime() || isVisible(mBinding.widget.info) ? View.VISIBLE : View.GONE);
mBinding.display.netspeed.setVisibility(Setting.isDisplaySpeed() && !isVisible(mBinding.control.getRoot()) ? View.VISIBLE : View.GONE);
}
private void onTimeChangeDisplaySpeed() {
if (Setting.isDisplaySpeed() && !isVisible(mBinding.control.getRoot())) Traffic.setSpeed(mBinding.display.netspeed);
if (isVisible(mBinding.control.getRoot())) showDisplayInfo();
else if (Setting.isDisplaySpeed()) Traffic.setSpeed(mBinding.display.netspeed);
}
@Override

@ -2,7 +2,11 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white_90" />
<gradient
android:type="linear"
android:startColor="@color/black_10"
android:endColor="@color/black_20"
android:angle="270"/>
<corners
android:topLeftRadius="8dp"

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:type="linear"
android:startColor="@color/black_10"
android:endColor="@color/black_20"
android:angle="90"/>
<corners
android:topLeftRadius="8dp"
android:topRightRadius="8dp" />
</shape>

@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/grey_600" />
<solid android:color="@color/black_50" />
<corners android:radius="4dp" />

@ -2,7 +2,8 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/grey_800" />
<solid android:color="@color/blue_500" />
<corners android:radius="4dp" />

@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/grey_600" />
<solid android:color="@color/black_50" />
<corners android:radius="4dp" />

@ -11,7 +11,7 @@
android:id="@+id/position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/grey_700"
android:textColor="@color/white"
android:textSize="16sp"
tools:text="00:00:00" />
@ -37,7 +37,7 @@
android:id="@+id/duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/grey_700"
android:textColor="@color/white"
android:textSize="16sp"
tools:text="00:00:00" />

@ -46,7 +46,8 @@
android:nextFocusDown="@id/timeBar"
android:text="@string/play_next"
android:textColor="@color/white"
android:textSize="14sp" />
android:textStyle="bold"
android:textSize="18sp" />
<TextView
android:id="@+id/prev"
@ -59,7 +60,8 @@
android:nextFocusDown="@id/timeBar"
android:text="@string/play_prev"
android:textColor="@color/white"
android:textSize="14sp" />
android:textStyle="bold"
android:textSize="18sp" />
<TextView
android:id="@+id/reset"
@ -71,7 +73,8 @@
android:focusableInTouchMode="true"
android:nextFocusDown="@id/timeBar"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
tools:text="刷新" />
<TextView
@ -85,7 +88,8 @@
android:nextFocusDown="@id/timeBar"
android:text="@string/play_change"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
tools:text="換源" />
<TextView
@ -98,7 +102,8 @@
android:focusableInTouchMode="true"
android:nextFocusDown="@id/timeBar"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
tools:text="EXO" />
<TextView
@ -111,7 +116,8 @@
android:focusableInTouchMode="true"
android:nextFocusDown="@id/timeBar"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
tools:text="硬解" />
<com.fongmi.android.tv.ui.custom.CustomUpDownView
@ -124,7 +130,8 @@
android:focusableInTouchMode="true"
android:nextFocusDown="@id/timeBar"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
tools:text="1.00" />
<TextView
@ -137,7 +144,8 @@
android:focusableInTouchMode="true"
android:nextFocusDown="@id/timeBar"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
tools:text="預設" />
<com.fongmi.android.tv.ui.custom.CustomUpDownView
@ -152,7 +160,8 @@
android:tag="3"
android:text="@string/play_track_text"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
android:visibility="gone"
tools:visibility="visible" />
@ -168,7 +177,8 @@
android:tag="1"
android:text="@string/play_track_audio"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
android:visibility="gone"
tools:visibility="visible" />
@ -184,7 +194,8 @@
android:tag="2"
android:text="@string/play_track_video"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
android:visibility="gone"
tools:visibility="visible" />
@ -198,7 +209,8 @@
android:focusableInTouchMode="true"
android:nextFocusDown="@id/timeBar"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
tools:text="00:00" />
<com.fongmi.android.tv.ui.custom.CustomUpDownView
@ -211,7 +223,8 @@
android:focusableInTouchMode="true"
android:nextFocusDown="@id/timeBar"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
android:textSize="18sp"
tools:text="00:00" />
<TextView
@ -225,7 +238,8 @@
android:nextFocusDown="@id/timeBar"
android:text="@string/play_danmu"
android:textColor="@color/text"
android:textSize="14sp" />
android:textStyle="bold"
android:textSize="18sp" />
<TextView
android:id="@+id/loop"
@ -238,7 +252,8 @@
android:nextFocusDown="@id/timeBar"
android:text="@string/play_loop"
android:textColor="@color/text"
android:textSize="14sp" />
android:textStyle="bold"
android:textSize="18sp" />
</LinearLayout>
</HorizontalScrollView>

@ -7,6 +7,7 @@
<RelativeLayout
android:id="@+id/info"
android:background="@drawable/shape_info"
android:visibility="invisible"
tools:visibility="visible"
android:layout_width="match_parent"

Loading…
Cancel
Save