Move floating TTS controls above reader menu
Build & Test / Build & Test App (push) Has been cancelled
Release / Extract tag name (push) Has been cancelled
Update website / update_website (release) Has been cancelled
Release / Build (push) Has been cancelled
Release / Build (FOSS) (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled

This commit is contained in:
BookOasis Reader
2026-09-27 17:03:29 +09:00
parent ba1b4d2362
commit eca7a3b886
@@ -20,6 +20,8 @@ import android.view.WindowManager
import android.widget.Toast import android.widget.Toast
import androidx.activity.enableEdgeToEdge import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels import androidx.activity.viewModels
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
@@ -310,11 +312,16 @@ class ReaderActivity : BaseActivity() {
ttsState.readerChapterId == state.currentChapter?.chapter?.id && ttsState.readerChapterId == state.currentChapter?.chapter?.id &&
state.currentChapter?.pages?.any { it is TextReaderPage } == true state.currentChapter?.pages?.any { it is TextReaderPage } == true
if (showFloatingTts) { if (showFloatingTts) {
val floatingTtsBottomPadding by animateDpAsState(
targetValue = if (state.menuVisible) 144.dp else 72.dp,
animationSpec = tween(durationMillis = 200),
label = "floatingTtsBottomPadding",
)
Row( Row(
modifier = Modifier modifier = Modifier
.align(Alignment.BottomEnd) .align(Alignment.BottomEnd)
.navigationBarsPadding() .navigationBarsPadding()
.padding(end = 18.dp, bottom = 72.dp), .padding(end = 18.dp, bottom = floatingTtsBottomPadding),
horizontalArrangement = Arrangement.spacedBy(10.dp), horizontalArrangement = Arrangement.spacedBy(10.dp),
) { ) {
IconButton( IconButton(