Birden Çok Sekmeli NavigationBar
Alt kısımdan üst düzey bölümler arasında geçiş yapın.
Birden Çok Sekmeli NavigationBar, CoddyKit'te ücretsiz bir Jetpack Compose Academy dersidir. Bu, 4 dersinin 1. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Jetpack Compose Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Jetpack Compose Academy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Meet NavigationBar
Material 3 gives you NavigationBar, a bar pinned to the bottom that lets people jump between the top-level sections of your app. 📱
When to Use It
Reach for a NavigationBar when your app has three to five equally important destinations, like Home, Search, and Profile.
It Lives in the Scaffold
You usually drop the bar into a Scaffold bottomBar slot, so it stays fixed while the screen content scrolls above it.
Scaffold(
bottomBar = { NavigationBar { /* items */ } }
) { padding -> Content(padding) }Each Tab Is an Item
Inside the bar you add one NavigationBarItem per destination. Each item is a clickable tab with its own icon and label.
NavigationBar {
NavigationBarItem(/* ... */)
NavigationBarItem(/* ... */)
}The selected Flag
Every item needs a selected boolean. Exactly one item should be true at a time so the bar shows where the user is.
NavigationBarItem(
selected = current == "home",
onClick = { go("home") }
)Handle the Tap
The onClick lambda runs when the tab is pressed. This is where you tell your navigation to switch to that section.
Give It an Icon
The icon slot takes a Composable, usually an Icon from the Material set, so each tab is instantly recognizable.
icon = { Icon(Icons.Default.Home, contentDescription = "Home") }Add a Label
The label slot shows short text under the icon. Keep it to one clear word so it fits and reads fast.
label = { Text("Home") }A Model for Tabs
It helps to keep your tabs in a simple data class list, so the bar can loop over them instead of hard-coding each item.
data class Tab(val route: String, val icon: ImageVector, val label: String)Loop to Build the Bar
With a tab list you can forEach over it and emit one NavigationBarItem per entry, keeping the bar tidy and easy to extend.
tabs.forEach { tab ->
NavigationBarItem(/* uses tab fields */)
}Pair It with Content
The bar only switches the active section. You still pair it with a NavHost or a when block that actually swaps the screen content.
Quick Check
You added three tabs to your NavigationBar. Quick check on the basics.
Recap
You met NavigationBar: drop it in the Scaffold, add a NavigationBarItem per section with an icon, label, selected flag, and onClick. Nice work! 🎉
Sıkça Sorulan Sorular
“Birden Çok Sekmeli NavigationBar” dersi ücretsiz mi?
Evet — “Birden Çok Sekmeli NavigationBar” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Jetpack Compose Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Jetpack Compose Academy kursu toplamda 4 dersten oluşur.
“Birden Çok Sekmeli NavigationBar” dersinde ne öğreneceğim?
Alt kısımdan üst düzey bölümler arasında geçiş yapın. Jetpack Compose Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Jetpack Compose Academy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Jetpack Compose Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 1. dersidir.
“Birden Çok Sekmeli NavigationBar” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Jetpack Compose Academy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Jetpack Compose Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Birden Çok Sekmeli NavigationBar
- Seçili Rotayı Vurgulama
- Geçişte Sekme Durumunu Koruma
- TabRow ve Kaydırılabilir Sayfalar