d-a-n/react-native-multiple-choice

Android version is having scrolling issue if fixed height is provided for multiple choice

niranjan-b-prajapati opened this issue · 1 comments

Hi,

I have a screen in which i have other components and also react-native-multiple-choice i have given fixed height as i don't want it to increase the screen height all wrapped in scrollview. The screen works perfectly on ios and i am able to scroll whole screen as well as the react-native-multiple-choice but same code doesn't work on android.

Following is the code please check and let me know if i am doing anything wrong or missing anything:

<ScrollView
      showsVerticalScrollIndicator={false}
      ref="scroll" >
        <TouchableWithoutFeedback onPress={dismissKeyboard}>
          <View>
            <View style={[ComponentStyles.componentMargins, ComponentStyles.topMargin]}>
              <Text style={[ComponentStyles.headerText]}>Please tell us about your music teaching experience. {'\n'}How many years have you been teaching for ?</Text>
              <View>
                <View style={[ComponentStyles.marginSmallTopBottom,{flexDirection:'row', alignItems:'center', justifyContent:'space-between',}]}>
    		<Text style={[ComponentStyles.headerText]}>
    		Years
    		</Text>
    		<View>
    		{expYearsComponent}
    		</View>
    		</View>
              </View>
            </View>
            <Separator/>
            <View style={[ComponentStyles.componentMargins, ComponentStyles.topMargin]}>
              <Text style={[ComponentStyles.headerText]}>Have you worked at any educational Institute?</Text>
              <View style={[ComponentStyles.topMargin, ComponentStyles.bottomMargin,{flexDirection:'row'}]}>
                <View style={[{flexDirection: 'row', alignItems: 'center',}]}>
                  <MKRadioButton
                    checked={this.state.workedAtInstitute}
                    rippleDuration={100}
                    group={this.taughtAtInstituteRadioGroup}
                    onCheckedChange={this.onRadioCheckedChange.bind(this) }/>
                  <Text style={[ComponentStyles.contentText]}>Yes</Text>
                </View>
                <View style={[ComponentStyles.marginSmallRightLeft,{flexDirection: 'row', alignItems: 'center',}]}>
                  <MKRadioButton
                  checked = {!this.state.workedAtInstitute}
                  rippleDuration={100}
                  group={this.taughtAtInstituteRadioGroup}/>
                  <Text style={[ComponentStyles.contentText]}>No</Text>
                </View>
              </View>
            </View>
            <Separator/>
            <View style={[ComponentStyles.componentMargins,ComponentStyles.topMargin, ComponentStyles.bottomMargin]}>
              <Text style={[ComponentStyles.headerText]}>In what languages can you teach ?</Text>              
                <MultipleChoice
                  style={[{flex:1, height:300}]}
                  options={languagesList}
                  selectedOptions={this.state.languages}
                  maxSelectedOptions={0}
                  onSelection={this.onLanguageSelection.bind(this) }
                  />             
            </View>
            <Separator/>

            <View style={[
              ComponentStyles.componentMargin,
              ComponentStyles.marginLargeTopBottom,
              {flexDirection: 'row', justifyContent: 'center',}]}>
              <View style={[{marginRight:8}]}>
                {cancelButton}
              </View>
              <View>
                {saveButton}
              </View>
            </View>
            <Spinner overlayColor="rgba(255,255,255, 0.45)" color="#ED1C24" visible={this.props.spinnerVisibilityObject.spinnerVisible && this.props.spinnerVisibilityObject.spinnerType === SpinnerTypes.SAVE_TEACHER_PREFERENCES}/>
          </View>
        </TouchableWithoutFeedback>

      </ScrollView>

Can anyone please help me with this ??