class MainActivity : ComponentActivity() {
@OptIn(ExperimentalFoundationApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
val tabItems = listOf("Diziler", "Filmler", "Keşfet", "Profil")
val pagerState = rememberPagerState()
ButtomNavigationTheme {
// A surface container using the 'background' color from the theme
Surface(){
Column() {
TabRow(
selectedTabIndex = pagerState.currentPage,
backgroundColor = Malibu,
//PROBLEM IN HERE. BACKGROUNDCOLOR IS RED
modifier = Modifier.padding(all = 20.dp).background(color = Color.Transparent)
){
}
background color = Malibu is red. Do I miss to import something? I dont know what to do. Or can I do this in a different way? this is the image of red error
these are my imports. I couldnt add in code because it was too long for the stackoverflow
You have to specify the
containerColor
andcontententColor
separately. There is nobackgroundColor
in the Material3 version ofTabRow
.