Fix nav bar icons
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
			
		||||
package com.ti.mobpo
 | 
			
		||||
 | 
			
		||||
import androidx.compose.foundation.layout.Box
 | 
			
		||||
import androidx.compose.foundation.layout.fillMaxSize
 | 
			
		||||
import androidx.compose.foundation.layout.padding
 | 
			
		||||
import androidx.compose.material.icons.Icons
 | 
			
		||||
@@ -7,8 +8,10 @@ import androidx.compose.material.icons.filled.Favorite
 | 
			
		||||
import androidx.compose.material.icons.filled.Home
 | 
			
		||||
import androidx.compose.material.icons.filled.Person
 | 
			
		||||
import androidx.compose.material.icons.outlined.Favorite
 | 
			
		||||
import androidx.compose.material.icons.outlined.FavoriteBorder
 | 
			
		||||
import androidx.compose.material.icons.outlined.Home
 | 
			
		||||
import androidx.compose.material.icons.outlined.Person
 | 
			
		||||
import androidx.compose.material3.Icon
 | 
			
		||||
import androidx.compose.material3.MaterialTheme
 | 
			
		||||
import androidx.compose.material3.NavigationBar
 | 
			
		||||
import androidx.compose.material3.NavigationBarItem
 | 
			
		||||
@@ -42,7 +45,7 @@ fun Navigation() {
 | 
			
		||||
        BottomNavigationItem(
 | 
			
		||||
            title = "Favourites",
 | 
			
		||||
            selectedIcon = Icons.Filled.Favorite,
 | 
			
		||||
            unselectedItem = Icons.Outlined.Favorite,
 | 
			
		||||
            unselectedItem = Icons.Outlined.FavoriteBorder,
 | 
			
		||||
            route = Screen.Favourites.route
 | 
			
		||||
        ),
 | 
			
		||||
        BottomNavigationItem(
 | 
			
		||||
@@ -70,10 +73,12 @@ fun Navigation() {
 | 
			
		||||
                        label = { Text(item.title) },
 | 
			
		||||
                        alwaysShowLabel = true,
 | 
			
		||||
                        icon = {
 | 
			
		||||
                            if (index == selectedItemIndex) {
 | 
			
		||||
                                item.selectedIcon
 | 
			
		||||
                            } else {
 | 
			
		||||
                                item.unselectedItem
 | 
			
		||||
                            Box {
 | 
			
		||||
                                Icon(imageVector = if (index == selectedItemIndex) {
 | 
			
		||||
                                    item.selectedIcon
 | 
			
		||||
                                } else {
 | 
			
		||||
                                    item.unselectedItem
 | 
			
		||||
                                }, contentDescription = item.title)
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    )
 | 
			
		||||
@@ -82,7 +87,9 @@ fun Navigation() {
 | 
			
		||||
        },
 | 
			
		||||
        content = { innerPadding ->
 | 
			
		||||
            Surface(
 | 
			
		||||
                modifier = Modifier.fillMaxSize().padding(innerPadding),
 | 
			
		||||
                modifier = Modifier
 | 
			
		||||
                    .fillMaxSize()
 | 
			
		||||
                    .padding(innerPadding),
 | 
			
		||||
                color = MaterialTheme.colorScheme.background,
 | 
			
		||||
                content = {
 | 
			
		||||
                    NavHost(navController = navController, startDestination = Screen.PokeSearch.route) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user