Skip to content

PanResponder onPanResponderRelease doesn't calls on Android #9447

@shahen94

Description

@shahen94

I have this code in my render function.

<Animated.View
        style={[styles.wrap, { left }]}
        {...this.scrollResponder.panHandlers}
      >
        {initialRender &&
          <View style={styles.wrap} {...this.listViewResponder.panHandlers}>
            <ListView
              ref={ref => this.listView = ref}
              onScroll={this.handleScroll}
              dataSource={posts}
              renderRow={this.renderRow}
              renderSectionHeader={this.renderHeader}
              onEndReachedThreshold={300}
              onEndReached={this.getPosts}
              enableEmptySections={true}
              refreshControl={
                <RefreshControl
                  refreshing={refreshing}
                  onRefresh={this.onRefresh}
                />
              }
            />
            {!onProfile && this.renderSettings()}
          </View>
        }
        {this.renderComments()}
        {loading && !refreshing && <Loading />}
      </Animated.View>
componentWillMount() {
    this.listViewResponder = PanResponder.create({
      onMoveShouldSetPanResponderCapture: this.setMove,
      onPanResponderMove: this.handleMove,
      onPanResponderRelease: this.handleMoveEnd,
      onPanResponderTerminationRequest: () => false
    });
    this.scrollResponder = PanResponder.create({
      onStartShouldSetPanResponderCapture: (e) => e.nativeEvent.pageY < THUMB_SIZE,
      onPanResponderRelease: this.handlePress,
    });
  }

It's works fine on iOS,
But on Android onPanResponderRelease doesn't calls every time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions