Skip to content

Commit

Permalink
Color Theme clean-up
Browse files Browse the repository at this point in the history
Fix auto back after last episode
  • Loading branch information
takagen99 committed Jan 22, 2023
1 parent d335bca commit fbcb718
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/com/github/tvbox/osc/base/BaseActivity.java
Expand Up @@ -84,6 +84,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
setTheme(R.style.NarutoTheme);
} else if (Hawk.get(HawkConfig.THEME_SELECT, 0) == 4) {
setTheme(R.style.MinionTheme);
} else if (Hawk.get(HawkConfig.THEME_SELECT, 0) == 5) {
setTheme(R.style.YagamiTheme);
} else {
setTheme(R.style.SakuraTheme);
}
Expand Down
Expand Up @@ -905,7 +905,7 @@ public boolean dispatchKeyEvent(KeyEvent event) {
// preview : true 开启 false 关闭
VodInfo previewVodInfo = null;
boolean showPreview = Hawk.get(HawkConfig.SHOW_PREVIEW, true);
boolean fullWindows = false;
public boolean fullWindows = false;
ViewGroup.LayoutParams windowsPreview = null;
ViewGroup.LayoutParams windowsFull = null;

Expand Down
Expand Up @@ -714,6 +714,7 @@ public void onClick(View v) {
types.add(3);
types.add(4);
types.add(5);
types.add(6);
SelectDialog<Integer> dialog = new SelectDialog<>(mActivity);
dialog.setTip(getString(R.string.dia_theme));
dialog.setAdapter(new SelectDialogAdapter.SelectDialogInterface<Integer>() {
Expand Down Expand Up @@ -819,6 +820,8 @@ String getThemeView(int type) {
return "鸣人";
} else if (type == 4) {
return "小黄";
} else if (type == 5) {
return "八神";
} else {
return "樱花";
}
Expand Down
Expand Up @@ -808,7 +808,7 @@ public void playNext(boolean inProgress) {
if (!hasNext) {
Toast.makeText(requireContext(), "已经是最后一集了", Toast.LENGTH_SHORT).show();
// takagen99: To auto go back to Detail Page after last episode
if (inProgress) {
if (inProgress && ((DetailActivity) mActivity).fullWindows) {
((DetailActivity) mActivity).toggleFullPreview();
// ((DetailActivity) mActivity).setScreenOff();
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_live_play.xml
Expand Up @@ -724,7 +724,7 @@
android:id="@+id/play_back"
android:layout_width="@dimen/vs_60"
android:layout_height="@dimen/vs_60"
android:layout_gravity="center|right"
android:layout_gravity="center|left"
android:layout_marginStart="@dimen/vs_50"
android:layout_marginLeft="@dimen/vs_50"
android:layout_marginEnd="@dimen/vs_50"
Expand Down
21 changes: 15 additions & 6 deletions app/src/main/res/values/styles.xml
Expand Up @@ -27,7 +27,7 @@
<item name="color_theme_60">#99D81F26</item>
<item name="color_theme_50">#80D81F26</item>
<item name="color_theme_40">#66D81F26</item>
<item name="color_theme_dark_70">#B3781216</item>
<item name="color_theme_dark_70">#B38C1418</item>
</style>
<style name="DoraeTheme" parent="AppTheme.NoActionBar">
<item name="color_theme">#18A2E7</item>
Expand All @@ -36,7 +36,7 @@
<item name="color_theme_60">#9918A2E7</item>
<item name="color_theme_50">#8018A2E7</item>
<item name="color_theme_40">#6618A2E7</item>
<item name="color_theme_dark_70">#B310638C</item>
<item name="color_theme_dark_70">#B3106D9C</item>
</style>
<style name="PepsiTheme" parent="AppTheme.NoActionBar">
<item name="color_theme">#004B93</item>
Expand All @@ -45,7 +45,7 @@
<item name="color_theme_60">#99004B93</item>
<item name="color_theme_50">#80004B93</item>
<item name="color_theme_40">#66004B93</item>
<item name="color_theme_dark_70">#B300305E</item>
<item name="color_theme_dark_70">#B3002547</item>
</style>
<style name="NarutoTheme" parent="AppTheme.NoActionBar">
<item name="color_theme">#FF7439</item>
Expand All @@ -54,7 +54,7 @@
<item name="color_theme_60">#99FF7439</item>
<item name="color_theme_50">#80FF7439</item>
<item name="color_theme_40">#66FF7439</item>
<item name="color_theme_dark_70">#B3A74B23</item>
<item name="color_theme_dark_70">#B3B35127</item>
</style>
<style name="MinionTheme" parent="AppTheme.NoActionBar">
<item name="color_theme">#FFD55E</item>
Expand All @@ -63,7 +63,16 @@
<item name="color_theme_60">#99FFD55E</item>
<item name="color_theme_50">#80FFD55E</item>
<item name="color_theme_40">#66FFD55E</item>
<item name="color_theme_dark_70">#B369592C</item>
<item name="color_theme_dark_70">#B3B39542</item>
</style>
<style name="YagamiTheme" parent="AppTheme.NoActionBar">
<item name="color_theme">#FF2F70</item>
<item name="color_theme_80">#CCFF2F70</item>
<item name="color_theme_70">#B3FF2F70</item>
<item name="color_theme_60">#99FF2F70</item>
<item name="color_theme_50">#80FF2F70</item>
<item name="color_theme_40">#66FF2F70</item>
<item name="color_theme_dark_70">#B3B3204E</item>
</style>
<style name="SakuraTheme" parent="AppTheme.NoActionBar">
<item name="color_theme">#FD9BDB</item>
Expand All @@ -72,7 +81,7 @@
<item name="color_theme_60">#99FD9BDB</item>
<item name="color_theme_50">#80FD9BDB</item>
<item name="color_theme_40">#66FD9BDB</item>
<item name="color_theme_dark_70">#B3964963</item>
<item name="color_theme_dark_70">#B3B06B98</item>
</style>

<!-- 自定义dialog样式 -->
Expand Down

0 comments on commit fbcb718

Please sign in to comment.