diff --git a/app/src/main/res/drawable/shape_widget.xml b/app/src/leanback/res/drawable/shape_widget.xml
similarity index 100%
rename from app/src/main/res/drawable/shape_widget.xml
rename to app/src/leanback/res/drawable/shape_widget.xml
diff --git a/app/src/main/res/drawable-hdpi/ic_vod_error.png b/app/src/main/res/drawable-hdpi/ic_vod_error.png
deleted file mode 100644
index 40715e1cb..000000000
Binary files a/app/src/main/res/drawable-hdpi/ic_vod_error.png and /dev/null differ
diff --git a/app/src/main/res/drawable-mdpi/ic_vod_error.png b/app/src/main/res/drawable-mdpi/ic_vod_error.png
deleted file mode 100644
index 23f1ac1e2..000000000
Binary files a/app/src/main/res/drawable-mdpi/ic_vod_error.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_vod_error.png b/app/src/main/res/drawable-xhdpi/ic_vod_error.png
deleted file mode 100644
index f0d05bb92..000000000
Binary files a/app/src/main/res/drawable-xhdpi/ic_vod_error.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_vod_error.png b/app/src/main/res/drawable-xxhdpi/ic_vod_error.png
deleted file mode 100644
index e73afcaa1..000000000
Binary files a/app/src/main/res/drawable-xxhdpi/ic_vod_error.png and /dev/null differ
diff --git a/app/src/main/res/drawable/ic_pause.xml b/app/src/main/res/drawable/ic_control_pause.xml
similarity index 100%
rename from app/src/main/res/drawable/ic_pause.xml
rename to app/src/main/res/drawable/ic_control_pause.xml
diff --git a/app/src/main/res/drawable/ic_play.xml b/app/src/main/res/drawable/ic_control_play.xml
similarity index 100%
rename from app/src/main/res/drawable/ic_play.xml
rename to app/src/main/res/drawable/ic_control_play.xml
diff --git a/app/src/main/res/drawable/ic_widget_error.xml b/app/src/main/res/drawable/ic_widget_error.xml
new file mode 100644
index 000000000..1cfa10ed7
--- /dev/null
+++ b/app/src/main/res/drawable/ic_widget_error.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_forward.xml b/app/src/main/res/drawable/ic_widget_forward.xml
similarity index 100%
rename from app/src/main/res/drawable/ic_forward.xml
rename to app/src/main/res/drawable/ic_widget_forward.xml
diff --git a/app/src/main/res/drawable/ic_rewind.xml b/app/src/main/res/drawable/ic_widget_rewind.xml
similarity index 100%
rename from app/src/main/res/drawable/ic_rewind.xml
rename to app/src/main/res/drawable/ic_widget_rewind.xml
diff --git a/app/src/mobile/java/com/fongmi/android/tv/ui/activity/DetailActivity.java b/app/src/mobile/java/com/fongmi/android/tv/ui/activity/DetailActivity.java
index b2ec1ff4f..789cf33d6 100644
--- a/app/src/mobile/java/com/fongmi/android/tv/ui/activity/DetailActivity.java
+++ b/app/src/mobile/java/com/fongmi/android/tv/ui/activity/DetailActivity.java
@@ -202,21 +202,21 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
mBinding.control.seek.setListener(mPlayers);
mBinding.more.setOnClickListener(view -> onMore());
mBinding.control.text.setOnClickListener(this::onTrack);
- mBinding.control.audio.setOnClickListener(this::onTrack);
- mBinding.control.video.setOnClickListener(this::onTrack);
+ //mBinding.control.audio.setOnClickListener(this::onTrack);
+ //mBinding.control.video.setOnClickListener(this::onTrack);
mBinding.control.full.setOnClickListener(view -> onFull());
mBinding.control.next.setOnClickListener(view -> checkNext());
mBinding.control.prev.setOnClickListener(view -> checkPrev());
mBinding.control.scale.setOnClickListener(view -> onScale());
mBinding.control.speed.setOnClickListener(view -> onSpeed());
- mBinding.control.reset.setOnClickListener(view -> onReset());
+ //mBinding.control.reset.setOnClickListener(view -> onReset());
mBinding.control.rotate.setOnClickListener(view -> onRotate());
mBinding.control.player.setOnClickListener(view -> onPlayer());
mBinding.control.decode.setOnClickListener(view -> onDecode());
mBinding.control.ending.setOnClickListener(view -> onEnding());
mBinding.control.opening.setOnClickListener(view -> onOpening());
mBinding.control.speed.setOnLongClickListener(view -> onSpeedLong());
- mBinding.control.reset.setOnLongClickListener(view -> onResetToggle());
+ //mBinding.control.reset.setOnLongClickListener(view -> onResetToggle());
mBinding.control.ending.setOnLongClickListener(view -> onEndingReset());
mBinding.control.opening.setOnLongClickListener(view -> onOpeningReset());
mBinding.video.setOnTouchListener((view, event) -> mKeyDown.onTouchEvent(event));
@@ -244,7 +244,7 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
mBinding.control.player.setText(mPlayers.getPlayerText());
getExo().setVisibility(mPlayers.isExo() ? View.VISIBLE : View.GONE);
getIjk().setVisibility(mPlayers.isIjk() ? View.VISIBLE : View.GONE);
- mBinding.control.reset.setText(ResUtil.getStringArray(R.array.select_reset)[Prefers.getReset()]);
+ //mBinding.control.reset.setText(ResUtil.getStringArray(R.array.select_reset)[Prefers.getReset()]);
}
private void setDecodeView() {
@@ -300,7 +300,7 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
}
private void getPlayer(Vod.Flag flag, Vod.Flag.Episode episode, boolean replay) {
- mBinding.widget.title.setText(getString(R.string.detail_title, mBinding.name.getText(), episode.getName()));
+ mBinding.control.title.setText(getString(R.string.detail_title, mBinding.name.getText(), episode.getName()));
mViewModel.playerContent(getKey(), flag.getFlag(), episode.getUrl());
updateHistory(episode, replay);
showProgress();
@@ -477,7 +477,7 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
private boolean onResetToggle() {
Prefers.putReset(Math.abs(Prefers.getReset() - 1));
- mBinding.control.reset.setText(ResUtil.getStringArray(R.array.select_reset)[Prefers.getReset()]);
+ //mBinding.control.reset.setText(ResUtil.getStringArray(R.array.select_reset)[Prefers.getReset()]);
setR1Callback();
return true;
}
@@ -543,7 +543,6 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
private void enterFullscreen() {
mBinding.video.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
- mBinding.control.getRoot().setBackgroundResource(R.drawable.shape_controller);
getIjk().getSubtitleView().setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
mBinding.control.full.setImageResource(R.drawable.ic_full_off);
@@ -556,7 +555,6 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT);
mBinding.episode.scrollToPosition(mEpisodeAdapter.getPosition());
mBinding.control.full.setImageResource(R.drawable.ic_full_on);
- mBinding.control.getRoot().setBackgroundResource(0);
mBinding.video.setLayoutParams(mFrameParams);
App.post(mR3, 2000);
setFullscreen(false);
@@ -564,35 +562,35 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
}
private void showProgress() {
- mBinding.widget.progress.setVisibility(View.VISIBLE);
+ mBinding.control.progress.setVisibility(View.VISIBLE);
App.post(mR2, 0);
hideError();
}
private void hideProgress() {
- mBinding.widget.progress.setVisibility(View.GONE);
+ mBinding.control.progress.setVisibility(View.GONE);
App.removeCallbacks(mR2);
Traffic.reset();
}
private void showError(String text) {
- mBinding.widget.text.setText(text);
- mBinding.widget.error.setVisibility(View.VISIBLE);
+ mBinding.control.text.setText(text);
+ mBinding.control.error.setVisibility(View.VISIBLE);
}
private void hideError() {
- mBinding.widget.text.setText("");
- mBinding.widget.error.setVisibility(View.GONE);
+ mBinding.control.text.setText("");
+ mBinding.control.error.setVisibility(View.GONE);
}
private void showInfo() {
- mBinding.widget.center.setVisibility(View.VISIBLE);
- mBinding.widget.info.setVisibility(View.VISIBLE);
+ mBinding.control.center.setVisibility(View.VISIBLE);
+ mBinding.control.info.setVisibility(View.VISIBLE);
}
private void hideInfo() {
- mBinding.widget.center.setVisibility(View.GONE);
- mBinding.widget.info.setVisibility(View.GONE);
+ mBinding.control.center.setVisibility(View.GONE);
+ mBinding.control.info.setVisibility(View.GONE);
}
private void showControl() {
@@ -608,7 +606,7 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
}
private void hideCenter() {
- mBinding.widget.action.setImageResource(R.drawable.ic_play);
+ mBinding.widget.action.setImageResource(R.drawable.ic_control_play);
hideInfo();
}
diff --git a/app/src/mobile/java/com/fongmi/android/tv/ui/activity/MainActivity.java b/app/src/mobile/java/com/fongmi/android/tv/ui/activity/MainActivity.java
index e88c5a6f5..99f258b50 100644
--- a/app/src/mobile/java/com/fongmi/android/tv/ui/activity/MainActivity.java
+++ b/app/src/mobile/java/com/fongmi/android/tv/ui/activity/MainActivity.java
@@ -63,6 +63,11 @@ public class MainActivity extends BaseActivity implements NavigationBarView.OnIt
mBinding.navigation.setOnItemSelectedListener(this);
}
+ private void checkAction(Intent intent) {
+ boolean push = ApiConfig.hasPush() && intent.getAction() != null && intent.getAction().equals(Intent.ACTION_SEND) && intent.getType().equals("text/plain");
+ if (push) DetailActivity.push(this, intent.getStringExtra(Intent.EXTRA_TEXT));
+ }
+
private void initFragment(Bundle savedInstanceState) {
mManager = new FragmentStateManager(mBinding.container, getSupportFragmentManager()) {
@Override
@@ -100,11 +105,6 @@ public class MainActivity extends BaseActivity implements NavigationBarView.OnIt
};
}
- private void checkAction(Intent intent) {
- boolean push = ApiConfig.hasPush() && intent.getAction() != null && intent.getAction().equals(Intent.ACTION_SEND) && intent.getType().equals("text/plain");
- if (push) DetailActivity.push(this, intent.getStringExtra(Intent.EXTRA_TEXT));
- }
-
private void setConfirm() {
confirm = true;
Notify.show(R.string.app_exit);
diff --git a/app/src/mobile/res/drawable/ic_control_next.xml b/app/src/mobile/res/drawable/ic_control_next.xml
new file mode 100644
index 000000000..e4443c7c3
--- /dev/null
+++ b/app/src/mobile/res/drawable/ic_control_next.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/mobile/res/drawable/ic_control_prev.xml b/app/src/mobile/res/drawable/ic_control_prev.xml
new file mode 100644
index 000000000..39f4215ae
--- /dev/null
+++ b/app/src/mobile/res/drawable/ic_control_prev.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/mobile/res/drawable/ic_control_rotate.xml b/app/src/mobile/res/drawable/ic_control_rotate.xml
new file mode 100644
index 000000000..66eca5c09
--- /dev/null
+++ b/app/src/mobile/res/drawable/ic_control_rotate.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/app/src/mobile/res/drawable/ic_control_setting.xml b/app/src/mobile/res/drawable/ic_control_setting.xml
new file mode 100644
index 000000000..154a7f0ee
--- /dev/null
+++ b/app/src/mobile/res/drawable/ic_control_setting.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/mobile/res/drawable/ic_home.xml b/app/src/mobile/res/drawable/ic_home.xml
deleted file mode 100644
index cc37b8746..000000000
--- a/app/src/mobile/res/drawable/ic_home.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
diff --git a/app/src/mobile/res/drawable/ic_lock_off.xml b/app/src/mobile/res/drawable/ic_lock_off.xml
index e8664e261..2aea05f6c 100644
--- a/app/src/mobile/res/drawable/ic_lock_off.xml
+++ b/app/src/mobile/res/drawable/ic_lock_off.xml
@@ -1,7 +1,7 @@
-
-
diff --git a/app/src/mobile/res/drawable/ic_setting.xml b/app/src/mobile/res/drawable/ic_nav_setting.xml
similarity index 100%
rename from app/src/mobile/res/drawable/ic_setting.xml
rename to app/src/mobile/res/drawable/ic_nav_setting.xml
diff --git a/app/src/mobile/res/drawable/ic_vod.xml b/app/src/mobile/res/drawable/ic_nav_vod.xml
similarity index 100%
rename from app/src/mobile/res/drawable/ic_vod.xml
rename to app/src/mobile/res/drawable/ic_nav_vod.xml
diff --git a/app/src/mobile/res/drawable/shape_action.xml b/app/src/mobile/res/drawable/shape_control_action.xml
similarity index 100%
rename from app/src/mobile/res/drawable/shape_action.xml
rename to app/src/mobile/res/drawable/shape_control_action.xml
diff --git a/app/src/mobile/res/drawable/shape_control_center.xml b/app/src/mobile/res/drawable/shape_control_center.xml
new file mode 100644
index 000000000..78cfa62ed
--- /dev/null
+++ b/app/src/mobile/res/drawable/shape_control_center.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/mobile/res/drawable/shape_controller.xml b/app/src/mobile/res/drawable/shape_controller.xml
deleted file mode 100644
index 1ca0632ea..000000000
--- a/app/src/mobile/res/drawable/shape_controller.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/mobile/res/layout/adapter_parse.xml b/app/src/mobile/res/layout/adapter_parse.xml
index b669402db..9bbddbd91 100644
--- a/app/src/mobile/res/layout/adapter_parse.xml
+++ b/app/src/mobile/res/layout/adapter_parse.xml
@@ -4,7 +4,7 @@
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/shape_action"
+ android:background="@drawable/shape_control_action"
android:gravity="center"
android:textColor="@color/text"
android:textSize="14sp"
diff --git a/app/src/mobile/res/layout/view_control_seek.xml b/app/src/mobile/res/layout/view_control_seek.xml
index a7ab9f3e1..7510fad1f 100644
--- a/app/src/mobile/res/layout/view_control_seek.xml
+++ b/app/src/mobile/res/layout/view_control_seek.xml
@@ -20,8 +20,8 @@
android:id="@+id/timeBar"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginEnd="4dp"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"
android:layout_weight="1"
android:focusable="true"
android:focusableInTouchMode="true"
diff --git a/app/src/mobile/res/layout/view_control_temp.xml b/app/src/mobile/res/layout/view_control_temp.xml
new file mode 100644
index 000000000..b18aa5220
--- /dev/null
+++ b/app/src/mobile/res/layout/view_control_temp.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/mobile/res/layout/view_control_vod.xml b/app/src/mobile/res/layout/view_control_vod.xml
index e643f0996..68216d81b 100644
--- a/app/src/mobile/res/layout/view_control_vod.xml
+++ b/app/src/mobile/res/layout/view_control_vod.xml
@@ -1,67 +1,160 @@
-
-
-
+
+
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="16dp"
+ android:layout_marginEnd="16dp"
+ android:orientation="vertical"
+ android:visibility="gone"
+ tools:visibility="visible">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ android:layout_weight="1" />
-
+ android:background="?attr/selectableItemBackgroundBorderless"
+ android:src="@drawable/ic_full_on" />
-
+
+
+
@@ -70,131 +163,68 @@
android:id="@+id/decode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginEnd="8dp"
- android:background="@drawable/shape_action"
+ android:layout_marginStart="16dp"
android:textColor="@color/white"
android:textSize="14sp"
tools:text="硬解" />
+ tools:text="片頭" />
-
+ android:layout_marginStart="16dp"
+ android:src="@drawable/ic_control_prev" />
-
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ android:src="@drawable/ic_control_play" />
-
+ android:layout_marginEnd="16dp"
+ android:src="@drawable/ic_control_next" />
+ tools:text="片尾" />
+ tools:text="速度" />
+ tools:text="縮放" />
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/mobile/res/layout/view_widget_vod.xml b/app/src/mobile/res/layout/view_widget_vod.xml
index be45d213d..5c12b6355 100644
--- a/app/src/mobile/res/layout/view_widget_vod.xml
+++ b/app/src/mobile/res/layout/view_widget_vod.xml
@@ -4,108 +4,27 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ tools:visibility="visible">
+ android:src="@drawable/ic_widget_error" />
@@ -113,23 +32,26 @@
-
+
+
+
\ No newline at end of file
diff --git a/app/src/mobile/res/menu/menu_nav.xml b/app/src/mobile/res/menu/menu_nav.xml
index 208a9fd6c..86d8793e3 100644
--- a/app/src/mobile/res/menu/menu_nav.xml
+++ b/app/src/mobile/res/menu/menu_nav.xml
@@ -3,12 +3,12 @@
\ No newline at end of file