小编vin*_*812的帖子

ListEmptyComponent未在React Native Section List中使用flex 1全屏显示

所以我使用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上而不会拉伸到全屏.

flexbox react-native

9
推荐指数
2
解决办法
1359
查看次数

交互之前的触发触发在Windows Phone 8中更改ListPicker

当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

xaml eventtrigger mvvm windows-phone windows-phone-8

6
推荐指数
1
解决办法
1715
查看次数

在没有互联网的情况下使用 Javascript 获取 GPS 位置

嗨,如果设备有 GPS 硬件,我们可以在没有互联网连接的情况下使用 javascript 获取 GPS 位置吗?

请注意谁将其标记为重复

我需要 javascript 在没有互联网连接的情况下工作,并使用 GPS 硬件来确定位置。

html javascript gps geolocation

6
推荐指数
1
解决办法
7149
查看次数