fix: make settings great again

auto and time stamps are intertwined already and the dividers should serve a purpose
This commit is contained in:
TwistedUmbrellaX 2024-03-29 21:44:25 -04:00
parent ff3131d988
commit 012b1cd79d
11 changed files with 149 additions and 160 deletions

View file

@ -137,11 +137,6 @@ class PlayerSettingsActivity : AppCompatActivity() {
binding.playerSettingsAutoSkipOpEd.isEnabled = isChecked
}
binding.playerSettingsTimeStampsAutoHide.isChecked = PrefManager.getVal(PrefName.AutoHideTimeStamps)
binding.playerSettingsTimeStampsAutoHide.setOnCheckedChangeListener { _, isChecked ->
PrefManager.setVal(PrefName.AutoHideTimeStamps, isChecked)
}
binding.playerSettingsTimeStampsProxy.isChecked =
PrefManager.getVal(PrefName.UseProxyForTimeStamps)
binding.playerSettingsTimeStampsProxy.setOnCheckedChangeListener { _, isChecked ->
@ -152,6 +147,13 @@ class PlayerSettingsActivity : AppCompatActivity() {
PrefManager.getVal(PrefName.ShowTimeStampButton)
binding.playerSettingsShowTimeStamp.setOnCheckedChangeListener { _, isChecked ->
PrefManager.setVal(PrefName.ShowTimeStampButton, isChecked)
binding.playerSettingsTimeStampsAutoHide.isEnabled = isChecked
}
binding.playerSettingsTimeStampsAutoHide.isChecked = PrefManager.getVal(PrefName.AutoHideTimeStamps)
binding.playerSettingsTimeStampsAutoHide.isEnabled = binding.playerSettingsShowTimeStamp.isChecked
binding.playerSettingsTimeStampsAutoHide.setOnCheckedChangeListener { _, isChecked ->
PrefManager.setVal(PrefName.AutoHideTimeStamps, isChecked)
}
// Auto

View file

@ -491,37 +491,6 @@
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsTimeStampsAutoHide"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:checked="true"
android:drawableStart="@drawable/ic_round_art_track_24"
android:drawablePadding="16dp"
android:elegantTextHeight="true"
android:fontFamily="@font/poppins_bold"
android:minHeight="64dp"
android:paddingHorizontal="32dp"
android:text="@string/auto_hide_time_stamps"
android:textAlignment="viewStart"
android:textColor="@color/bg_opp"
app:cornerRadius="0dp"
app:drawableTint="?attr/colorPrimary"
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-8dp"
android:layout_marginBottom="8dp"
android:alpha="0.58"
android:fontFamily="@font/poppins_family"
android:paddingHorizontal="32dp"
android:text="@string/hide_skip_button"
android:textSize="14sp" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsTimeStampsProxy"
android:layout_width="match_parent"
@ -576,23 +545,36 @@
</com.google.android.material.materialswitch.MaterialSwitch>
</ani.dantotsu.others.Xpandable>
<ani.dantotsu.others.Xpandable
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsTimeStampsAutoHide"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_marginBottom="8dp"
android:checked="true"
android:drawableStart="@drawable/ic_round_art_track_24"
android:drawablePadding="16dp"
android:elegantTextHeight="true"
android:fontFamily="@font/poppins_bold"
android:minHeight="64dp"
android:paddingHorizontal="32dp"
android:text="@string/auto_hide_time_stamps"
android:textAlignment="viewStart"
android:textColor="@color/bg_opp"
app:cornerRadius="0dp"
app:drawableTint="?attr/colorPrimary"
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<TextView
android:layout_width="match_parent"
android:layout_height="64dp"
android:fontFamily="@font/poppins_bold"
android:gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_marginTop="-8dp"
android:layout_marginBottom="8dp"
android:alpha="0.58"
android:fontFamily="@font/poppins_family"
android:paddingHorizontal="32dp"
android:text="@string/auto"
android:textColor="?attr/colorSecondary"
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />
android:text="@string/hide_skip_button"
android:textSize="14sp" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsAutoSkipOpEd"

View file

@ -19,6 +19,13 @@
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/settingsFAQ"
android:layout_width="match_parent"

View file

@ -18,10 +18,18 @@
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<LinearLayout
android:id="@+id/settingsAnilistLoginContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal">
<ImageView
@ -260,5 +268,12 @@
app:drawableStartCompat="@drawable/ic_round_help_24"
app:drawableTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
</ani.dantotsu.others.Xpandable>
</merge>

View file

@ -18,6 +18,13 @@
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -90,14 +97,6 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/settingsPlayer"
android:layout_width="match_parent"
@ -122,13 +121,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/purgeAnimeDownloads"
android:layout_width="match_parent"
@ -151,14 +143,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/settingsPreferDub"
android:layout_width="match_parent"
@ -194,6 +178,7 @@
app:drawableTint="?attr/colorPrimary"
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/settingsIncludeAnimeList"
android:layout_width="match_parent"
@ -212,6 +197,13 @@
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
</ani.dantotsu.others.Xpandable>
</merge>

View file

@ -19,6 +19,12 @@
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<LinearLayout
android:layout_width="match_parent"
@ -91,14 +97,6 @@
</androidx.cardview.widget.CardView>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/settingsUi"
android:layout_width="match_parent"
@ -121,13 +119,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/settingsDownloadManager"
android:layout_width="match_parent"
@ -152,13 +143,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/importExportSettings"
android:layout_width="match_parent"
@ -183,14 +167,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
<!--TODO: Add support for SD card-->
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/settingsDownloadInSd"
@ -223,6 +199,7 @@
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="8dp"
app:boxCornerRadiusBottomEnd="8dp"
app:boxCornerRadiusBottomStart="8dp"
app:boxCornerRadiusTopEnd="8dp"
@ -317,5 +294,14 @@
app:drawableTint="?attr/colorPrimary"
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
</ani.dantotsu.others.Xpandable>
</merge>

View file

@ -20,6 +20,13 @@
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/userAgent"
android:layout_width="match_parent"
@ -43,14 +50,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
<TextView
android:id="@+id/animeRepoHeading"
android:layout_width="match_parent"
@ -61,6 +60,13 @@
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<LinearLayout
android:id="@+id/animeRepoInventory"
android:layout_width="match_parent"
@ -94,22 +100,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<View
android:id="@+id/mangaRepoHeadingDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
<TextView
android:id="@+id/mangaRepoHeading"
android:layout_width="match_parent"
@ -120,6 +110,14 @@
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<View
android:id="@+id/mangaRepoDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<LinearLayout
android:id="@+id/mangaRepoInventory"
android:layout_width="match_parent"
@ -153,15 +151,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:id="@+id/mangaRepoDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/settingsForceLegacyInstall"
android:layout_width="match_parent"
@ -216,5 +205,13 @@
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
</ani.dantotsu.others.Xpandable>
</merge>

View file

@ -18,10 +18,17 @@
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="24dp"
android:layout_marginTop="16dp"
android:gravity="center"
android:orientation="horizontal">
@ -71,14 +78,6 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/settingsReader"
android:layout_width="match_parent"
@ -101,13 +100,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/purgeMangaDownloads"
android:layout_width="match_parent"
@ -130,13 +122,6 @@
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/purgeNovelDownloads"
android:layout_width="match_parent"

View file

@ -18,6 +18,13 @@
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<Button
android:id="@+id/settingsSubscriptionsTime"
style="@style/Widget.Material3.Button.TextButton"
@ -157,5 +164,13 @@
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/listDivider" />
</ani.dantotsu.others.Xpandable>
</merge>

View file

@ -18,6 +18,13 @@
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -94,6 +101,7 @@
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="8dp"
app:boxCornerRadiusBottomEnd="8dp"
app:boxCornerRadiusBottomStart="8dp"
app:boxCornerRadiusTopEnd="8dp"

View file

@ -452,7 +452,7 @@
<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="timestamps">Segments</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>