我有反应原生的工具栏,像这样
点击搜索图标时,我需要打开这样的输入文字
我为此尝试了许多例子,但我不能适用于我的情况,任何帮助???
这是我的代码:
constructor(props, context) {
super(props, context);
const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2
});
this.state = {
visible: false,
selectedTab: 'view1',
ds:[{CustomerName: "Customer Name", CustomerPhone: "+564659878964"},{CustomerName: "Customer Name", CustomerPhone: "+564659878964"},{CustomerName: "Customer Name", CustomerPhone: "+564659878964"},{CustomerName: "Customer Name", CustomerPhone: "+564659878964"},{CustomerName: "Customer Name", CustomerPhone: "+564659878964"},{CustomerName: "Customer Name", CustomerPhone: "+564659878964"},{CustomerName: "Customer Name", CustomerPhone: "+564659878964"},{CustomerName: "Customer Name", CustomerPhone: "+564659878964"},{CustomerName: "Customer Name", CustomerPhone: "+564659878964"}],
dataSource:ds,
}
}
<TouchableHighlight
onPress={()=>this.toggleStatus()}>
<Image style={styles.imagestyle}
source={require('./ic_search.png')} />
</TouchableHighlight>
<Text style={styles.toolbarTitle}>CUSTOMERS</Text>
<TouchableHighlight onPress={() => this.moveToAddNewCustomer()}>
<Image style={styles.imagestyle}
visible={this.state.visible}
source={require('./ic_action_name.png')} />
</TouchableHighlight>
</View>
我如何隐藏标题并打开输入文本???
答案 0 :(得分:0)
如果导航栏可以访问FB.login() called before FB.init().
状态,那么您应该只能使用visible
语句来确定要显示的内容
if