Add transparency options to subtitle (#281)
* feat: add state llistener to Xpandable * feat: improve app restart process * feat: support subtitle transparency
This commit is contained in:
parent
89e18b0e2f
commit
85ef4b3c12
9 changed files with 259 additions and 129 deletions
|
@ -166,6 +166,44 @@
|
|||
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
|
||||
tools:ignore="TextContrastCheck" />
|
||||
|
||||
<ani.dantotsu.others.Xpandable
|
||||
android:id="@+id/subtitleTest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="32dp"
|
||||
android:text="@string/sub_text_example"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
|
||||
tools:ignore="TextContrastCheck" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/subtitleTestWindow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitleTestText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="32dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="@string/sub_text_example" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp" />
|
||||
</ani.dantotsu.others.Xpandable>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/subSwitch"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -292,6 +330,37 @@
|
|||
android:text="@string/sub_window_color_info"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/videoSubAlphaButton"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:paddingHorizontal="32dp"
|
||||
android:text="@string/sub_alpha"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_color_24"
|
||||
app:iconPadding="16dp"
|
||||
app:iconSize="24dp"
|
||||
android:clickable="false" />
|
||||
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/videoSubAlpha"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="1"
|
||||
android:stepSize="0.1">
|
||||
|
||||
</com.google.android.material.slider.Slider>
|
||||
|
||||
<Button
|
||||
android:id="@+id/videoSubFont"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
|
|
|
@ -243,6 +243,8 @@
|
|||
<string name="sub_window_color_select">Subtitle Window Color</string>
|
||||
<string name="sub_window_color_info">"The subtitle window is the part left and right from them. (where the background isn\'t)"</string>
|
||||
<string name="sub_color_info"><b>Note:</b> Changing above settings only affects Soft-Subtitles!</string>
|
||||
<string name="sub_alpha">Subtitle Transparency</string>
|
||||
<string name="sub_text_example">Example Subtitle</string>
|
||||
<string name="sub_font_select">Subtitle Font</string>
|
||||
<string name="subtitle_font_size">Subtitle Size</string>
|
||||
|
||||
|
@ -344,14 +346,7 @@
|
|||
<string name="reload">Reload</string>
|
||||
<string name="share">Share</string>
|
||||
<string name="skip">Skip</string>
|
||||
<string name="show_skip_time_stamp_button">Show Skip Time Stamp Button</string>
|
||||
<string name="always_load_time_stamps">Always Load Time Stamps</string>
|
||||
<string name="auto_hide_time_stamps">Auto Hide Time Stamps</string>string
|
||||
<string name="hide_skip_button">Hide Skip Button</string>
|
||||
<string name="timestamps">Time Stamps</string>
|
||||
<string name="other">Other</string>
|
||||
<string name="auto_skip_op_ed">Auto Skip OP / ED</string>
|
||||
<string name="requires_time_stamps_to_be_enabled">Requires Time Stamps to be Enabled</string>
|
||||
<string name="total_repeats">TOTAL REPEATS</string>
|
||||
<string name="custom_lists">Custom Lists</string>
|
||||
<string name="donate_desc">Want to support Dantotsu\'s Maintainer?\nConsider Donating</string>
|
||||
|
@ -429,6 +424,13 @@
|
|||
<string name="anilist_not_found">Seems like that wasn\'t found on Anilist.</string>
|
||||
<string name="disabled_auto_skip">Disabled Auto Skipping OP & ED</string>
|
||||
<string name="auto_skip">Auto Skipping OP & ED</string>
|
||||
<string name="show_skip_time_stamp_button">Show Skip Time Stamp Button</string>
|
||||
<string name="always_load_time_stamps">Always Load Time Stamps</string>
|
||||
<string name="auto_hide_time_stamps">Auto Hide Time Stamps</string>string
|
||||
<string name="timestamps">Time Stamps</string>
|
||||
<string name="auto_skip_op_ed">Auto Skip OP / ED</string>
|
||||
<string name="requires_time_stamps_to_be_enabled">Requires Time Stamps to be Enabled</string>
|
||||
<string name="hide_skip_button">Make the skip time stamp button disappear after 5 seconds</string>
|
||||
<string name="copied_to_clipboard">Copied to Clipboard</string>
|
||||
<string name="first_episode">This is the 1st Episode!</string>
|
||||
<string name="reset_auto_update">You can long click List Editor button to Reset Auto Update</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue