We need to prepare the bottom navigation markup.
Inside a View
with styles style.navbar
, add four Image
elements.
These images will be our navigation buttons.
Each image must be 40px high and 60px wide.
The corners of each image must be 5px rounded.
The resizeMode of each image must be center
so that the images are in the middle of the button.
The background of each button must be rgba(26, 138, 173, 0.49)
.
The source of the first image must be https://learn.coderslang.com/home.png
.
The source of the second image must be https://learn.coderslang.com/like.png
.
The source of the third image should be https://learn.coderslang.com/search.png
.
The source of the fourth image should be https://learn.coderslang.com/profile.png
.
This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task
App.js
import React from 'react';
import { Image, StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<View style={styles.screen}>
<Text>Screen content</Text>
</View>
<View style={styles.navbar}></View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
screen: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#E39A28',
},
navbar: {
height: 70,
flexDirection: 'row',
justifyContent: 'space-between',
paddingTop: 10,
paddingBottom: 10,
paddingLeft: 40,
paddingRight: 40,
},
});
app.json
{
"expo": {
"name": "1",
"slug": "1",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}