Я Теперь начал работать на главном экране, я, однако, столкнулся с проблемой, используя TVFocusGuideView.
Код: Выделить всё
import React from 'react';
import { View, Text, StyleSheet, TouchableOpacity, TVFocusGuideView } from 'react-native';
import { Icon } from 'react-native-elements';
const ProfileDetails = ({ route, navigation }) => {
const { profile } = route.params;
return (
{/* This part is for the navigation bar */}
Movies
Series
Search
Live TV
Settings
{/* This part is for the profile details screen */}
Profile Details
Profile Name: {profile.profileName}
Domain Name: {profile.domainName}
Username: {profile.username}
Password: {profile.password}
navigation.goBack()}
>
Back
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'black',
},
navContainer: {
flex: 1,
backgroundColor: 'grey',
marginHorizontal: 20,
borderRadius: 10,
marginTop: 20,
justifyContent: 'center',
},
navBar: {
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
},
navItem: {
flexDirection: 'row',
alignItems: 'center',
},
navText: {
color: 'white',
fontSize: 18,
marginLeft: 5,
},
detailsContainerWrapper: {
flex: 5,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'red',
},
detailsContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
padding: 20,
},
title: {
color: 'white',
fontSize: 40,
fontWeight: 'bold',
marginBottom: 20,
},
profileIcon: {
backgroundColor: 'black',
borderRadius: 80,
padding: 30,
borderWidth: 2,
borderColor: 'white',
marginBottom: 20,
},
profileName: {
color: 'white',
fontSize: 24,
marginBottom: 10,
},
profileDetail: {
color: 'white',
fontSize: 18,
marginBottom: 5,
},
button: {
backgroundColor: '#2196f3',
borderRadius: 20,
paddingVertical: 10,
paddingHorizontal: 20,
marginTop: 20,
},
buttonText: {
color: 'white',
fontSize: 16,
},
});
export default ProfileDetails;
Подробнее здесь: https://stackoverflow.com/questions/788 ... lex-bigger