- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试构建一个简单的登录屏幕。但是,当我尝试将内容居中时,元素不会停止上下跳动。 .如果我删除 flex 或 justifyContent 属性,它就会停止跳转。我的代码看起来像这样
export default class LoginScreen extends React.Component {
render() {
return (
<View style={Styles.container} >
<Text>Hello world</Text>
</View>
)}
let Styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
// padding: 15,
// backgroundColor: 'red',
justifyContent: 'center',
alignItems: 'center',
},
)
我的 App.js 看起来像这样
import { Platform } from 'react-native';
import { Navigation } from 'react-native-navigation';
import registerScreens from './app/Screens';
import {
AppRegistry,
Text,
} from 'react-native';
registerScreens();
let tabs = [
{
label: 'Login',
screen: 'tasks.LoginScreen', // this is a registered name for a screen
icon: require('./assets/account_circle.png'),
// selectedIcon: require('../img/one_selected.png'), // iOS only
title: 'Hello world'
},
{
label: 'Two',
screen: 'tasks.CreateUserScreen',
icon: require('./assets/account_circle.png'),
// selectedIcon: require('../img/two_selected.png'), // iOS only
title: 'Screen Two'
}
]
Navigation.startTabBasedApp({
tabs,
animationType: Platform.OS === 'ios' ? 'slide-down' : 'fade',
tabsStyle: {
tabBarBackgroundColor: '#003a66',
tabBarButtonColor: '#ffffff',
tabBarSelectedButtonColor: '#ff505c',
tabFontFamily: 'BioRhyme-Bold',
},
appStyle: {
tabBarBackgroundColor: '#003a66',
navBarButtonColor: '#ffffff',
tabBarButtonColor: '#ffffff',
navBarTextColor: '#ffffff',
tabBarSelectedButtonColor: '#ff505c',
navigationBarColor: '#003a66',
navBarBackgroundColor: '#003a66',
statusBarColor: '#002b4c',
tabFontFamily: 'BioRhyme-Bold',
},
drawer: {
left: {
screen: 'tasks.LoginScreen'
}
}
});
最佳答案
在我自己的应用程序中尝试解决这个问题后,我发现唯一的解决方案是将 React-Native 从 0.50.x 降级到 0.49.x - 至少,这就是我最终解决的问题.
关于android - react-native 证明内容中心导致元素在 android 上跳来跳去,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47646390/
我正在尝试使用 nx 在图中找到一些特定节点(比方说 l 节点)的 1 跳、2 跳,如果需要,k 跳邻居。 single_source_dijkstra_path_length. 每个步骤的时间复杂度
假设在下一段中我的光标位于第一句中的第一个are上(希望我可以突出显示它,但我不能这样...... )。按两次 ff 后,第一句话就会傻瓜,然后of 。再按下去我将一事无成。 Some people
给定一个无向图,一个起始顶点和一个结束顶点。求出从源到汇的步行次数(这样一个顶点可以被多次访问)正好涉及 h 跳。例如,如果图形是三角形,则具有 h 跳的此类路径的数量由第 h 个 Jakobstah
我正在制作 Winston Wolf 的交互式 map 。我有一张世界地图,每个大陆都可以点击并显示该大陆的国家。当我点击非洲大陆时,页面会跳转到非洲国家(如您所料)。我的问题是,我可以阻止它跳跃吗?
这是我的第一个问题,所以如果我问错了,我很抱歉。 在我的实验中,多个 android 设备使用 WiFi Direct 连接。为了利用无线 tx 的广播特性,所有设备都加入一个多播组来交换它们的信息。
我最近开发了一个 WCF Facade 服务。我是 WCF 的新手,无法理解安全实现部分。 服务如下: 一个 asp.net 公共(public)网站有一个 WCF 客户端,它访问: DMZ 中的 W
序言: 当问楼梯问题时,通常给定的允许步幅数组是 [1,2,3] 在 SO 上看到很多相同问题的例子,比如 n-steps-with-1-2-or-3-steps-taken-how-many-way
我是一名优秀的程序员,十分优秀!