dimming
This commit is contained in:
parent
b8782b0507
commit
dc1edc9a42
11 changed files with 43 additions and 22 deletions
|
@ -318,7 +318,7 @@ class AnimeWatchFragment : Fragment() {
|
|||
if (allSettings.size > 1) {
|
||||
val names = allSettings.map { it.lang }.toTypedArray()
|
||||
var selectedIndex = 0
|
||||
AlertDialog.Builder(requireContext())
|
||||
val dialog = AlertDialog.Builder(requireContext())
|
||||
.setTitle("Select a Source")
|
||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||
selectedIndex = which
|
||||
|
@ -347,6 +347,7 @@ class AnimeWatchFragment : Fragment() {
|
|||
return@setNegativeButton
|
||||
}
|
||||
.show()
|
||||
dialog.window?.setDimAmount(0.8f)
|
||||
} else {
|
||||
// If there's only one setting, proceed with the fragment transaction
|
||||
requireActivity().runOnUiThread {
|
||||
|
|
|
@ -1111,7 +1111,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
val speedDialog =
|
||||
AlertDialog.Builder(this, R.style.DialogTheme).setTitle(getString(R.string.speed))
|
||||
exoSpeed.setOnClickListener {
|
||||
speedDialog.setSingleChoiceItems(speedsName, curSpeed) { dialog, i ->
|
||||
val dialog = speedDialog.setSingleChoiceItems(speedsName, curSpeed) { dialog, i ->
|
||||
if (isInitialized) {
|
||||
saveData("${media.id}_speed", i, this)
|
||||
speed = speeds[i]
|
||||
|
@ -1122,6 +1122,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
hideSystemBars()
|
||||
}
|
||||
}.show()
|
||||
dialog.window?.setDimAmount(0.8f)
|
||||
}
|
||||
speedDialog.setOnCancelListener { hideSystemBars() }
|
||||
|
||||
|
@ -1360,7 +1361,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
)
|
||||
)
|
||||
)
|
||||
AlertDialog.Builder(this, R.style.DialogTheme)
|
||||
val dialog = AlertDialog.Builder(this, R.style.DialogTheme)
|
||||
.setTitle(getString(R.string.continue_from, time)).apply {
|
||||
setCancelable(false)
|
||||
setPositiveButton(getString(R.string.yes)) { d, _ ->
|
||||
|
@ -1373,6 +1374,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
d.dismiss()
|
||||
}
|
||||
}.show()
|
||||
dialog.window?.setDimAmount(0.8f)
|
||||
} else buildExoplayer()
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ class MangaReadAdapter(
|
|||
}
|
||||
|
||||
// Create AlertDialog
|
||||
AlertDialog.Builder(currContext(), R.style.MyPopup)
|
||||
val dialog = AlertDialog.Builder(currContext(), R.style.MyPopup)
|
||||
.setView(dialogView)
|
||||
.setPositiveButton("OK") { dialog, which ->
|
||||
//add unchecked to hidden
|
||||
|
@ -185,6 +185,7 @@ class MangaReadAdapter(
|
|||
}
|
||||
.setNegativeButton("Cancel", null)
|
||||
.show()
|
||||
dialog.window?.setDimAmount(0.8f)
|
||||
}
|
||||
|
||||
binding.animeDownloadTop.setOnClickListener {
|
||||
|
@ -202,6 +203,7 @@ class MangaReadAdapter(
|
|||
}
|
||||
alertDialog.setNegativeButton("Cancel") { dialog, _ -> dialog.cancel() }
|
||||
val dialog = alertDialog.show()
|
||||
dialog.window?.setDimAmount(0.8f)
|
||||
}
|
||||
|
||||
var selected = when (style) {
|
||||
|
|
|
@ -338,7 +338,7 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
|
|||
if (allSettings.size > 1) {
|
||||
val names = allSettings.map { it.lang }.toTypedArray()
|
||||
var selectedIndex = 0
|
||||
AlertDialog.Builder(requireContext())
|
||||
val dialog = AlertDialog.Builder(requireContext())
|
||||
.setTitle("Select a Source")
|
||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||
selectedIndex = which
|
||||
|
@ -365,6 +365,7 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
|
|||
return@setNegativeButton
|
||||
}
|
||||
.show()
|
||||
dialog.window?.setDimAmount(0.8f)
|
||||
} else {
|
||||
// If there's only one setting, proceed with the fragment transaction
|
||||
val fragment = MangaSourcePreferencesFragment().getInstance(selectedSetting.id) {
|
||||
|
|
|
@ -112,7 +112,8 @@ class NovelResponseAdapter(
|
|||
builder.setNegativeButton("No") { _, _ ->
|
||||
// Do nothing
|
||||
}
|
||||
builder.show()
|
||||
val dialog = builder.show()
|
||||
dialog.window?.setDimAmount(0.8f)
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue