"立面样式"属性为Android 5.0+启用框阴影.
我是不是做了一些不寻常的"提升"来造成下面截图中的丑陋?还有,有没有办法定义阴影偏移?
The emulator is running 6.0 (> 5.0), so that's not the problem. I'm running react-native 25.1.
"dependencies": {
"react": "^0.14.8",
"react-native": "^0.25.1",
"react-native-gcm-android": "^0.2.0",
"react-native-material-design": "^0.3.5",
"react-native-system-notification": "^0.1.10",
"react-redux": "^4.4.5",
"redux": "^3.5.2"
}
Here's react-native's documentation for View component styling
以下是我的渲染方法:
render() {
return (
<ListView
dataSource={alertData}
renderRow={(rowData) =>
<View style={style.cardContainer}>
<Text>{rowData.blah}</Text>
<Text>{"#" + rowData.foo}</Text>
<Text>{rowData.blah}</Text>
<Text>{rowData.foo}</Text>
<Text>{rowData.baz}</Text>
</View>
}
/>
);
}
风格宣言:
var style = StyleSheet.create({
cardContainer : {
elevation : 3,
flex : 1,
margin : 10,
padding : 10,
borderWidth : 2,
borderColor : beeStyles.colors.lightGray
}
});
这就导致了...