Skip to content

Android redemtion arc #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Assets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StyleSheet, Dimensions } from 'react-native';
import { StyleSheet, Dimensions, Platform } from 'react-native';
// @ts-ignore
import Doughnut from '@/assets/images/javaZone2022Doughnut.webp';

Expand Down Expand Up @@ -176,7 +176,7 @@ export const Assets = {
alignItems: 'center',
justifyContent: 'space-between',
alignSelf: 'center',
marginTop: 50,
marginTop: Platform.OS === 'android' ? 0 : 50,
padding: 10,
},
pageTitle: {},
Expand Down
58 changes: 55 additions & 3 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,21 @@ const RootLayout = () => {
const styles = StyleSheet.create({
tabBar: {
position: 'absolute',
bottom: 0,
bottom: 10,
},
tabBarLabel: {
fontSize: 12,
fontFamily: 'Cinzel_400Regular',
},
tabBarBlurContainer: {
flex: 1,
padding: 42,
padding: Platform.OS === 'android' ? 30 : 42,
textAlign: 'center',
justifyContent: 'center',
overflow: 'hidden',
position: 'absolute',
width: '100%',
bottom: 0, // only moves blurContainer, not the actual tabs
bottom: Platform.OS === 'android' ? -10 : 0, // only moves blurContainer, not the actual tabs
},
header: {
display: 'flex',
Expand Down Expand Up @@ -325,6 +325,58 @@ const RootLayout = () => {
</I18nContextProvider>
</SafeAreaProvider>
);
} else if (Platform.OS === 'android') {
// @ts-ignore
return (
<SafeAreaProvider>
<I18nContextProvider>
<Tabs initialRouteName="[lang]/index" screenOptions={{ ...nativeScreenOptions }}>
<Tabs.Screen
name="[lang]/index"
options={{
title: 'Home',
tabBarIcon: ({ focused }) => renderIcon(focused, Assets.icons.Home, Assets.icons.HomeInactive),
}}
/>
<Tabs.Screen
name="[lang]/program"
options={{
title: 'Program',
tabBarIcon: ({ focused }) => renderIcon(focused, Assets.icons.Program, Assets.icons.ProgramInactive),
}}
/>
<Tabs.Screen
name="[lang]/partner"
options={{
title: 'Partner',
tabBarIcon: ({ focused }) => renderIcon(focused, Assets.icons.Partner, Assets.icons.PartnerInactive),
}}
/>
<Tabs.Screen
name="[lang]/speaker"
options={{
title: 'Speaker',
tabBarIcon: ({ focused }) => renderIcon(focused, Assets.icons.Speaker, Assets.icons.SpeakerInactive),
headerShown: false,
}}
/>
<Tabs.Screen
name="[lang]/volunteers"
options={{
title: 'Volunteers',
tabBarIcon: ({ focused }) =>
renderIcon(focused, Assets.icons.HandHeartActive, Assets.icons.HandHeartInactive),
}}
/>
<Tabs.Screen name="[lang]/info" options={{ href: null }} />
<Tabs.Screen name="[lang]/speaker/tips" options={{ href: null }} />
<Tabs.Screen name="[lang]/speaker/kids" options={{ href: null }} />
<Tabs.Screen name="[lang]/speaker/reimbursement" options={{ href: null }} />
<Tabs.Screen name="[lang]/+not-found" options={{ href: null }} />
</Tabs>
</I18nContextProvider>
</SafeAreaProvider>
);
} else {
// @ts-ignore
return (
Expand Down
Loading