Aayush's pr stuffs
This commit is contained in:
parent
8c957007ab
commit
b6c79dae40
14 changed files with 65 additions and 60 deletions
|
@ -125,7 +125,7 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
|
|||
Download.Type.NOVEL
|
||||
}
|
||||
// Alert dialog to confirm deletion
|
||||
val builder = androidx.appcompat.app.AlertDialog.Builder(requireContext(), R.style.DialogTheme)
|
||||
val builder = androidx.appcompat.app.AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||
builder.setTitle("Delete ${item.title}?")
|
||||
builder.setMessage("Are you sure you want to delete ${item.title}?")
|
||||
builder.setPositiveButton("Yes") { _, _ ->
|
||||
|
|
|
@ -62,7 +62,6 @@ import ani.dantotsu.R
|
|||
import ani.dantotsu.connections.anilist.Anilist
|
||||
import ani.dantotsu.connections.discord.Discord
|
||||
import ani.dantotsu.connections.discord.DiscordService
|
||||
import ani.dantotsu.connections.discord.DiscordService.Companion.ACTION_STOP_SERVICE
|
||||
import ani.dantotsu.connections.discord.DiscordServiceRunningSingleton
|
||||
import ani.dantotsu.connections.discord.RPC
|
||||
import ani.dantotsu.connections.updateProgress
|
||||
|
@ -816,14 +815,14 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
fun fastForward() {
|
||||
isFastForwarding = true
|
||||
exoPlayer.setPlaybackSpeed(exoPlayer.playbackParameters.speed * 2)
|
||||
snackString("Playing at 2x speed")
|
||||
snackString("Playing at ${exoPlayer.playbackParameters.speed}x speed")
|
||||
}
|
||||
|
||||
fun stopFastForward() {
|
||||
if (isFastForwarding) {
|
||||
isFastForwarding = false
|
||||
exoPlayer.setPlaybackSpeed(exoPlayer.playbackParameters.speed / 2)
|
||||
snackString("Playing at normal speed")
|
||||
snackString("Playing at default speed: ${exoPlayer.playbackParameters.speed}x")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1427,11 +1426,9 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
exoPlayer.release()
|
||||
VideoCache.release()
|
||||
mediaSession?.release()
|
||||
val stopIntent = Intent(this, DiscordService::class.java).apply {
|
||||
putExtra(ACTION_STOP_SERVICE, true)
|
||||
}
|
||||
val stopIntent = Intent(this, DiscordService::class.java)
|
||||
DiscordServiceRunningSingleton.running = false
|
||||
startService(stopIntent)
|
||||
stopService(stopIntent)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -57,10 +57,8 @@ class InstalledAnimeExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
var selectedIndex = 0
|
||||
AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||
.setTitle("Select a Source")
|
||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||
.setSingleChoiceItems(names, selectedIndex) { dialog, which ->
|
||||
selectedIndex = which
|
||||
}
|
||||
.setPositiveButton("OK") { dialog, _ ->
|
||||
selectedSetting = allSettings[selectedIndex]
|
||||
dialog.dismiss()
|
||||
|
||||
|
@ -86,10 +84,6 @@ class InstalledAnimeExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
.commit()
|
||||
}
|
||||
}
|
||||
.setNegativeButton("Cancel") { dialog, _ ->
|
||||
dialog.cancel()
|
||||
return@setNegativeButton
|
||||
}
|
||||
.show()
|
||||
} else {
|
||||
// If there's only one setting, proceed with the fragment transaction
|
||||
|
|
|
@ -64,10 +64,8 @@ class InstalledMangaExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
var selectedIndex = 0
|
||||
AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||
.setTitle("Select a Source")
|
||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||
.setSingleChoiceItems(names, selectedIndex) { dialog, which ->
|
||||
selectedIndex = which
|
||||
}
|
||||
.setPositiveButton("OK") { dialog, _ ->
|
||||
selectedSetting = allSettings[selectedIndex]
|
||||
dialog.dismiss()
|
||||
|
||||
|
@ -82,11 +80,6 @@ class InstalledMangaExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
.addToBackStack(null)
|
||||
.commit()
|
||||
}
|
||||
.setNegativeButton("Cancel") { dialog, _ ->
|
||||
dialog.cancel()
|
||||
changeUIVisibility(true)
|
||||
return@setNegativeButton
|
||||
}
|
||||
.show()
|
||||
} else {
|
||||
// If there's only one setting, proceed with the fragment transaction
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Color when the chip is selected -->
|
||||
<item android:color="?attr/colorSurface" android:state_selected="true"/>
|
||||
<item android:color="#ffffff" android:state_selected="true"/>
|
||||
<!-- Color when the chip is not selected -->
|
||||
<item android:color="?attr/colorOnSurface"/>
|
||||
<item android:color="#aaadab"/>
|
||||
</selector>
|
||||
|
|
5
app/src/main/res/drawable/ic_round_color_picker_24.xml
Normal file
5
app/src/main/res/drawable/ic_round_color_picker_24.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector android:height="24dp" android:viewportHeight="32"
|
||||
android:viewportWidth="32" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#000000" android:pathData="M27.7,3.3c-1.5,-1.5 -3.9,-1.5 -5.4,0L17,8.6l-1.3,-1.3c-0.4,-0.4 -1,-0.4 -1.4,0s-0.4,1 0,1.4l1.3,1.3L5,20.6c-0.6,0.6 -1,1.4 -1.1,2.3C3.3,23.4 3,24.2 3,25c0,1.7 1.3,3 3,3c0.8,0 1.6,-0.3 2.2,-0.9C9,27 9.8,26.6 10.4,26L21,15.4l1.3,1.3c0.2,0.2 0.5,0.3 0.7,0.3s0.5,-0.1 0.7,-0.3c0.4,-0.4 0.4,-1 0,-1.4L22.4,14l5.3,-5.3C29.2,7.2 29.2,4.8 27.7,3.3zM9,24.6c-0.4,0.4 -0.8,0.6 -1.3,0.5c-0.4,0 -0.7,0.2 -0.9,0.5C6.7,25.8 6.3,26 6,26c-0.6,0 -1,-0.4 -1,-1c0,-0.3 0.2,-0.7 0.5,-0.8c0.3,-0.2 0.5,-0.5 0.5,-0.9c0,-0.5 0.2,-1 0.5,-1.3L17,11.4l2.6,2.6L9,24.6z"/>
|
||||
</vector>
|
|
@ -84,15 +84,15 @@
|
|||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Installed Anime"/>
|
||||
android:text="@string/installed_anime"/>
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Available Anime"/>
|
||||
android:text="@string/available_anime"/>
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Installed Manga"/>
|
||||
android:text="@string/installed_manga"/>
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -248,24 +248,6 @@
|
|||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/settingsUseCustomTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:drawableStart="@drawable/ic_palette"
|
||||
android:drawablePadding="16dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:text="@string/use_custom_theme"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/settingsUseSourceTheme"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -284,6 +266,31 @@
|
|||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.58"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/custom_theme"/>
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/settingsUseCustomTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:drawableStart="@drawable/ic_palette"
|
||||
android:drawablePadding="16dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:text="@string/use_custom_theme"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/customTheme"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -298,12 +305,12 @@
|
|||
android:insetBottom="0dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/custom_theme"
|
||||
android:text="@string/color_picker"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_palette"
|
||||
app:icon="@drawable/ic_round_color_picker_24"
|
||||
app:iconPadding="16dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="?attr/colorPrimary" />
|
||||
|
|
|
@ -24,11 +24,12 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:backgroundTint="?attr/colorSecondaryContainer"
|
||||
android:backgroundTint="@color/yt_red"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:text="@string/play_yt"
|
||||
android:textColor="?attr/colorOnSecondaryContainer"
|
||||
android:textColor="@color/bg_white"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="12dp"
|
||||
app:icon="@drawable/ic_round_play_circle_24"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
android:layout_marginTop="-4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="-4dp"
|
||||
app:chipBackgroundColor="@color/bg_black"
|
||||
android:elegantTextHeight="true"
|
||||
android:textAppearance="@style/Suffix"
|
||||
app:chipStrokeColor="?attr/colorPrimaryContainer"
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_beta_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_beta_foreground"/>
|
||||
<monochrome android:drawable="@drawable/mono"/>
|
||||
</adaptive-icon>
|
|
@ -21,6 +21,7 @@
|
|||
<color name="grey_20">#444444</color>
|
||||
<color name="grey_60">#999999</color>
|
||||
<color name="darkest_Black">#000000</color>
|
||||
<color name="yt_red">#CD201F</color>
|
||||
|
||||
<color name="grey_nav">#E8EDEDED</color>
|
||||
|
||||
|
|
|
@ -634,7 +634,11 @@
|
|||
<string name="user_agent">User Agent</string>
|
||||
<string name="custom_theme">Custom Theme</string>
|
||||
<string name="use_custom_theme">Custom theme</string>
|
||||
<string name="use_unique_theme_for_each_item">Use cover as theme for each entry</string>
|
||||
<string name="use_unique_theme_for_each_item">Color same as Anime/Manga cover</string>
|
||||
<string name="oled_theme_variant">OLED theme variant</string>
|
||||
<string name="installed_anime">Installed Anime</string>
|
||||
<string name="available_anime">Available Anime</string>
|
||||
<string name="installed_manga">Installed Manga</string>
|
||||
<string name="color_picker">Color Picker</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MyPopup" parent="">
|
||||
<item name="android:fontFamily">@font/poppins</item>
|
||||
<item name="android:fontFamily">@font/poppins_bold</item>
|
||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||
<item name="android:popupBackground">?attr/colorSurface</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
|
@ -67,6 +67,7 @@
|
|||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomNavBar" parent="">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue