Skip to content

Commit

Permalink
Merge pull request #86 from Sadwhy/main
Browse files Browse the repository at this point in the history
Clean up switch
  • Loading branch information
rebelonion authored Dec 18, 2023
2 parents dfc10d5 + 74328cf commit 11d04ec
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import ani.dantotsu.connections.anilist.Anilist
import ani.dantotsu.connections.anilist.api.FuzzyDate
import ani.dantotsu.connections.mal.MAL
import ani.dantotsu.databinding.BottomSheetMediaListBinding
import com.google.android.material.switchmaterial.SwitchMaterial
import com.google.android.material.materialswitch.MaterialSwitch
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
Expand Down Expand Up @@ -196,7 +196,7 @@ class MediaListDialogFragment : BottomSheetDialogFragment() {
}

media?.inCustomListsOf?.forEach {
SwitchMaterial(requireContext()).apply {
MaterialSwitch(requireContext()).apply {
isChecked = it.value
text = it.key
setOnCheckedChangeListener { _, isChecked ->
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/color/button_switch_track.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?attr/colorOnBackground" android:state_checked="false"/>
<item android:color="?attr/colorPrimary" android:state_checked="true"/>
</selector>
<item android:color="?android:colorBackground" android:state_checked="true"/>
<item android:color="?attr/colorPrimary" android:state_checked="false"/>
</selector>
62 changes: 31 additions & 31 deletions app/src/main/res/layout/activity_player_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
android:paddingEnd="32dp"
android:text="@string/video" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsVideoInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -111,7 +111,7 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<TextView
android:layout_width="match_parent"
Expand Down Expand Up @@ -239,7 +239,7 @@
app:iconPadding="16dp"
app:iconSize="24dp" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsCursedSpeeds"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -299,7 +299,7 @@
android:paddingEnd="32dp"
android:text="@string/subtitles" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/subSwitch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -546,7 +546,7 @@
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
tools:ignore="TextContrastCheck" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsTimeStamps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -567,7 +567,7 @@
app:showText="false"
app:thumbTint="@color/button_switch_track" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsTimeStampsProxy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -601,7 +601,7 @@
android:text="@string/timestamp_proxy_desc"
android:textSize="14sp" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsShowTimeStamp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -622,7 +622,7 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

</ani.dantotsu.others.Xpandable>

Expand All @@ -643,7 +643,7 @@
android:paddingEnd="32dp"
android:text="@string/auto" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsAutoSkipOpEd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -676,7 +676,7 @@
android:text="@string/requires_time_stamps_to_be_enabled"
android:textSize="14sp" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsAutoPlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -697,7 +697,7 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<TextView
android:layout_width="match_parent"
Expand All @@ -711,7 +711,7 @@
android:text="@string/auto_play_next_episode_info"
android:textSize="14sp" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsAutoSkip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -732,7 +732,7 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<TextView
android:layout_width="match_parent"
Expand Down Expand Up @@ -765,7 +765,7 @@
android:paddingEnd="32dp"
android:text="@string/update_progress" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsAskUpdateProgress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -786,7 +786,7 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<TextView
android:layout_width="match_parent"
Expand All @@ -800,7 +800,7 @@
android:text="@string/ask_update_progress_info_ep"
android:textSize="14sp" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsAskUpdateHentai"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -821,7 +821,7 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<TextView
android:layout_width="match_parent"
Expand Down Expand Up @@ -882,7 +882,7 @@
android:paddingEnd="32dp"
android:text="@string/behaviour" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsAlwaysContinue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -903,9 +903,9 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsPauseVideo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -925,9 +925,9 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsVerticalGestures"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -947,9 +947,9 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsFastForward"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -970,9 +970,9 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsDoubleTap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -993,7 +993,7 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<TextView
android:layout_width="match_parent"
Expand Down Expand Up @@ -1155,7 +1155,7 @@
android:textColor="?attr/colorSecondary"
tools:ignore="TextContrastCheck" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsPiP"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -1175,10 +1175,10 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>


<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/playerSettingsCast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -1199,7 +1199,7 @@
app:showText="false"
app:thumbTint="@color/button_switch_track">

</com.google.android.material.switchmaterial.SwitchMaterial>
</com.google.android.material.materialswitch.MaterialSwitch>

<TextView
android:layout_width="match_parent"
Expand Down
Loading

0 comments on commit 11d04ec

Please sign in to comment.