How to modify Scrollview height dynamically in react native

Loading...

How to modify Scrollview height dynamically in react native

I have a scroll view with a full-length screen. With one flag I need to show button at the bottom. 
Am using Animated.View for showing button at Bottom.
When button visible am unable to change scroll view height.
If I try to manage with marginBottom it is showing unwanted white before getting a button with animation.
Here I need to do either change scroll view height dynamically or transparent unwanted white background.
Below is code snippet:
    const modalY = new Animated.Value(Dimensions.get('window').height);

openModal = () => {
    Animated.timing(modalY, {
        duration: 500,
        toValue: Dimensions.get('window').height - 60
     }).start();
  }

  closeModal = () => {
    Animated.timing(modalY, {
        duration: 300,
        toValue: Dimensions.get('window').height
     }).start();
  }

showButton = () => {
    const animationView = 
                          
                      ;

    return (
      animationView
    );
  };


const marBottom = buttonTitle ? 60 : 0;

here buttonTitle is flag

        
            
              { this.myItems()}
            
        
        { this.showButton() }
        {(buttonTitle) ? this.openModal() : this.closeModal()}
      


Solutions/Answers:

References

Loading...