1

我正在开发 android 中的移动应用程序。我在标注视图中显示了数据。在这个视图中,一个是可触摸的链接,一个是结束标签,但它是可触摸的整个标注。但是我想要当我点击特别像预约或关闭标签时,比如关闭标注(点击错误图像),但可以触摸整个应用程序。

我的代码:

 <MapView.Callout style={{width:260}}>
          <View style={{flexGrow:1,flexDirection:'row'}}>
           <View style={{flex:.3,alignItems:'center',justifyContent:'center'}}>
              {this.props.marker.DoctorImage == ''? (
              <Image source = {require('./Imgs/emptypic.png')} style={{height:70,width:70,borderRadius:35,resizeMode:'cover'}}/>
              ):(
              <Image source = {{uri:config.privacyUrl+this.props.marker.DoctorImage}} style={{height:70,width:70,borderRadius:35,resizeMode:'cover'}}/>
              )}
            </View>
            <View style={{flex:.64,justifyContent:'center'}}>
                    <Text style={{flex:.12}}>Name: {this.props.marker.FirstName} {this.props.marker.LastName}</Text>
                      <Text style={{flex:.12}}>Qualification: {this.props.marker.Qualification}</Text>
                        <Text style={{flex:.12}}>Fee: {this.props.marker.ConsultationFee}</Text>
                      <Text style={{flex:.12}}>Speciality: {this.props.marker.SpecialityName}</Text>
                    <Text style={{flex:.16,color:'#0000ff',fontWeight:'bold',fontSize:16}}>Book Appointment</Text>
                  </View>

                  <View style={{flex:.06,justifyContent:'center'}}>
                    <Image source = {require('./Imgs/close.png')} style ={{height:10,width:15}} />
                  </View>

          </View>

          </MapView.Callout>
4

0 回答 0