所以我使用React Native Section List,以下是我的ListEmptyContent代码
// define your styles
const styles = StyleSheet.create({
container: {
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#fff',
marginLeft: 10,
marginRight: 10,
},
imageStyle: {
width: 140,
height: 120,
},
titleStyle: {
fontSize: 14,
color: '#363a45',
},
subTitleStyle: {
fontSize: 12,
color: '#898d97',
},
});
// create a component
const GPEmtptyTransaction = ({ firstLine, secondLine }) => {
return (
<View style={styles.container}>
<Image source={images.emptyTransactionIcon} style={styles.imageStyle} />
<Text style={styles.titleStyle}>{firstLine}</Text>
<Text style={styles.subTitleStyle}>{secondLine}</Text>
</View>
);
};
Run Code Online (Sandbox Code Playgroud)
但是当渲染EmptyTemplate时,它将呈现在Top上而不会拉伸到全屏.
当ViewModel中出现触发器时,我遇到了一个问题,SelectedItem(参数)来自之前选择的Item.我需要新选择的项目作为selectionChanged的参数.
我是WP8的新手.下面是代码
<toolkit:ListPicker Header="Background"
ExpansionMode="FullscreenOnly"
Template="{StaticResource ListPickerControlTemplate}"
VerticalAlignment="Top"
ItemsSource="{Binding Path=Buildings.ObjectList}"
Margin="0"
x:Name="buldings"
Padding="0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding Path=BuildingSelectionCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=buldings}" />
</i:EventTrigger>
</i:Interaction.Triggers>
Run Code Online (Sandbox Code Playgroud)
谢谢Vinod
嗨,如果设备有 GPS 硬件,我们可以在没有互联网连接的情况下使用 javascript 获取 GPS 位置吗?
请注意谁将其标记为重复
我需要 javascript 在没有互联网连接的情况下工作,并使用 GPS 硬件来确定位置。
eventtrigger ×1
flexbox ×1
geolocation ×1
gps ×1
html ×1
javascript ×1
mvvm ×1
react-native ×1
xaml ×1