Browse Source

4个Tab

master
zhangjiming 3 months ago
parent
commit
7067a6e3b0
  1. 20
      app/(tabs)/_layout.tsx
  2. 10
      app/(tabs)/ble.tsx
  3. 10
      app/(tabs)/mine.tsx

20
app/(tabs)/_layout.tsx

@ -15,7 +15,7 @@ export default function TabLayout() {
<Tabs
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
headerShown: false,
headerShown: true,
tabBarButton: HapticTab,
tabBarBackground: TabBarBackground,
tabBarStyle: Platform.select({
@ -29,14 +29,28 @@ export default function TabLayout() {
<Tabs.Screen
name="index"
options={{
title: 'Home',
title: '测量',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
}}
/>
<Tabs.Screen
name="explore"
options={{
title: 'Explore',
title: '设置',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
}}
/>
<Tabs.Screen
name="ble"
options={{
title: '蓝牙',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
}}
/>
<Tabs.Screen
name="mine"
options={{
title: '我的',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
}}
/>

10
app/(tabs)/ble.tsx

@ -0,0 +1,10 @@
import { ThemedText } from '@/components/ThemedText';
import { View } from 'react-native';
export default function Ble() {
return (
<View>
<ThemedText>Ble</ThemedText>
</View>
);
}

10
app/(tabs)/mine.tsx

@ -0,0 +1,10 @@
import { ThemedText } from '@/components/ThemedText';
import { View } from 'react-native';
export default function Mine() {
return (
<View>
<ThemedText>Mine</ThemedText>
</View>
);
}
Loading…
Cancel
Save