This commit is contained in:
Horis 2024-08-29 18:38:52 +08:00
parent 184e6e96f8
commit 81f12cbd63

View File

@ -10,6 +10,8 @@ import android.view.Menu
import android.view.MenuItem
import android.widget.SeekBar
import androidx.activity.viewModels
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.lifecycle.lifecycleScope
import io.legado.app.R
import io.legado.app.base.VMBaseActivity
@ -49,6 +51,7 @@ import io.legado.app.utils.visible
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import splitties.views.bottomPadding
import splitties.views.onLongClick
import java.util.Locale
@ -184,6 +187,11 @@ class AudioPlayActivity :
binding.ivTimer.setOnClickListener {
timerSliderPopup.showAsDropDown(it, 0, (-100).dpToPx(), Gravity.TOP)
}
ViewCompat.setOnApplyWindowInsetsListener(binding.llPlayMenu) { _, windowInsets ->
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.navigationBars())
binding.llPlayMenu.bottomPadding = insets.bottom
windowInsets
}
}
private fun upCover(path: String?) {