mirror of https://github.com/readrops/Readrops.git
Enable BottomAppBar selected animation
This commit is contained in:
parent
ad0ffe55c9
commit
c9db21e881
|
@ -15,7 +15,6 @@ import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import cafe.adriel.voyager.androidx.AndroidScreen
|
import cafe.adriel.voyager.androidx.AndroidScreen
|
||||||
import cafe.adriel.voyager.navigator.CurrentScreen
|
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import cafe.adriel.voyager.navigator.currentOrThrow
|
import cafe.adriel.voyager.navigator.currentOrThrow
|
||||||
import cafe.adriel.voyager.navigator.tab.CurrentTab
|
import cafe.adriel.voyager.navigator.tab.CurrentTab
|
||||||
|
@ -40,7 +39,7 @@ class HomeScreen : AndroidScreen() {
|
||||||
bottomBar = {
|
bottomBar = {
|
||||||
BottomAppBar {
|
BottomAppBar {
|
||||||
NavigationBarItem(
|
NavigationBarItem(
|
||||||
selected = false,
|
selected = tabNavigator.current.key == TimelineTab.key,
|
||||||
onClick = { tabNavigator.current = TimelineTab },
|
onClick = { tabNavigator.current = TimelineTab },
|
||||||
icon = {
|
icon = {
|
||||||
Icon(
|
Icon(
|
||||||
|
@ -52,7 +51,7 @@ class HomeScreen : AndroidScreen() {
|
||||||
)
|
)
|
||||||
|
|
||||||
NavigationBarItem(
|
NavigationBarItem(
|
||||||
selected = false,
|
selected = tabNavigator.current.key == FeedTab.key,
|
||||||
onClick = { tabNavigator.current = FeedTab },
|
onClick = { tabNavigator.current = FeedTab },
|
||||||
icon = {
|
icon = {
|
||||||
Icon(
|
Icon(
|
||||||
|
@ -64,7 +63,7 @@ class HomeScreen : AndroidScreen() {
|
||||||
)
|
)
|
||||||
|
|
||||||
NavigationBarItem(
|
NavigationBarItem(
|
||||||
selected = false,
|
selected = tabNavigator.current.key == AccountTab.key,
|
||||||
onClick = { tabNavigator.current = AccountTab },
|
onClick = { tabNavigator.current = AccountTab },
|
||||||
icon = {
|
icon = {
|
||||||
Icon(
|
Icon(
|
||||||
|
@ -76,7 +75,7 @@ class HomeScreen : AndroidScreen() {
|
||||||
)
|
)
|
||||||
|
|
||||||
NavigationBarItem(
|
NavigationBarItem(
|
||||||
selected = false,
|
selected = tabNavigator.current.key == MoreTab.key,
|
||||||
onClick = { tabNavigator.current = MoreTab },
|
onClick = { tabNavigator.current = MoreTab },
|
||||||
icon = {
|
icon = {
|
||||||
Icon(
|
Icon(
|
||||||
|
|
Loading…
Reference in New Issue