Horizontal scrollview snapping react native

前端 未结 4 1978
臣服心动
臣服心动 2021-01-31 09:19

Hi I am trying to achieve scrollview snap to center like below gif link

Check This Gif

But unable to do so. Following is my react nat

4条回答
  •  孤城傲影
    2021-01-31 09:54

    Use the pagingEnabled property in ScrollView.

    const screenHeight = Dimensions.get('window').height;
    
    class Screen extends Component {
      constructor(props) {
        super(props);
      }
    
      render() {
        return (
          
            
            
          
        );
      }
    }
    

提交回复
热议问题