mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
Tweak animation slightly
This commit is contained in:
parent
ed6d935f55
commit
0c95b1a473
1 changed files with 7 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ import androidx.annotation.StringRes
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.animation.expandHorizontally
|
import androidx.compose.animation.expandHorizontally
|
||||||
import androidx.compose.animation.expandVertically
|
import androidx.compose.animation.expandVertically
|
||||||
|
import androidx.compose.animation.fadeIn
|
||||||
|
import androidx.compose.animation.fadeOut
|
||||||
import androidx.compose.animation.shrinkHorizontally
|
import androidx.compose.animation.shrinkHorizontally
|
||||||
import androidx.compose.animation.shrinkVertically
|
import androidx.compose.animation.shrinkVertically
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
|
|
@ -517,7 +519,7 @@ fun SearchPage(
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
horizontalArrangement = Arrangement.spacedBy(0.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
modifier =
|
modifier =
|
||||||
Modifier
|
Modifier
|
||||||
|
|
@ -528,8 +530,8 @@ fun SearchPage(
|
||||||
) {
|
) {
|
||||||
AnimatedVisibility(
|
AnimatedVisibility(
|
||||||
visible = voiceSearchButtonVisible,
|
visible = voiceSearchButtonVisible,
|
||||||
enter = expandHorizontally(expandFrom = Alignment.Start),
|
enter = fadeIn() + expandHorizontally(expandFrom = Alignment.End),
|
||||||
exit = shrinkHorizontally(shrinkTowards = Alignment.Start),
|
exit = fadeOut() + shrinkHorizontally(shrinkTowards = Alignment.End),
|
||||||
) {
|
) {
|
||||||
VoiceSearchButton(
|
VoiceSearchButton(
|
||||||
onSpeechResult = { spokenText ->
|
onSpeechResult = { spokenText ->
|
||||||
|
|
@ -537,6 +539,7 @@ fun SearchPage(
|
||||||
triggerImmediateSearch(spokenText)
|
triggerImmediateSearch(spokenText)
|
||||||
},
|
},
|
||||||
voiceInputManager = viewModel.voiceInputManager,
|
voiceInputManager = viewModel.voiceInputManager,
|
||||||
|
modifier = Modifier.padding(end = 12.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -571,6 +574,7 @@ fun SearchPage(
|
||||||
title = R.string.view_options,
|
title = R.string.view_options,
|
||||||
iconStringRes = R.string.fa_sliders,
|
iconStringRes = R.string.fa_sliders,
|
||||||
onClick = { showViewOptions = true },
|
onClick = { showViewOptions = true },
|
||||||
|
modifier = Modifier.padding(start = 12.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue