我需要在Android和iOS的React Native中更改文本行之间的空间.这是样式页面中的代码:text:{color:'#C0C0C0',fontSize:18,textAlign:'justify',},
我需要在第一次使用应用程序时在我的react本机应用程序中实现一个intro/tour.
我需要显示一个部分来提及它的作用,同时隐藏屏幕的其余部分,如下图所示.因此,基本上我的介绍将是如何使用应用程序每次显示内容并隐藏其余部分的指南,我们使用"下一步"按钮来完成所有操作.
我已经找到了这个存储库https://github.com/FuYaoDe/react-native-app-intro,但这不完全是我的目的...任何帮助?
所以,基本上,我需要制作一个非常类似的导游,如下一个https://github.com/worker8/TourGuide,但在做出反应本机应用程序
我需要使用原生库中的抽屉来为 android ios 和 android 响应原生应用程序。这是本机基础http://nativebase.io/docs/v2.0.0/components#drawer的链接,在下面你会找到我的代码:
import { Container, Header, Title, Content, Button, Icon, Left, Body, Text } from 'native-base';
import { Drawer } from 'native-base';
import SideBar from '../components/SideBar';
class App extends Component {
closeDrawer = () => {
this._drawer._root.close();
}
openDrawer = () => {
alert('open');
this._drawer._root.open();
}
render() {
return (
<Container>
<Header style={{ backgroundColor: '#C0C0C0' }}>
<Left>
<Button transparent onPress={this.openDrawer.bind(this)}>
<Icon style={style.icon} name='menu' />
</Button>
</Left>
<Body style={style.body}>
<Title style={{ color: '#FFF'}}> title </Title> …Run Code Online (Sandbox Code Playgroud) 我在我的反应本机应用程序中对文本进行了一些更改:我需要为段落指定Roboto灯,为标题指定Roboto Bold.我需要在iOS和Android应用程序中具有相同的文本外观:所以我需要使它适用于我尝试此代码行代码
text : {
fontFamily: 'sans-serif-light'
},
我从官方文档中尝试了这种类型,它工作正常
title : {
fontFamily: 'Cochin'
},
- >所以我认为问题出在Roboto fontfamily本身..任何帮助?
react-native ×5
android ×2
ios ×2
native-base ×2
text ×2
font-family ×1
fonts ×1
roboto ×1
tabs ×1