PanResponder goes out of view #427
NamrataDwivedi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a requirement to make a section swipeable in left and right only. There are 3 views in my Class Component.

In the above image I have applied the PanResponder to Red box, but the effect is happening in whole Green portion of the UI.
`import React, { Component } from 'react';
import { StyleSheet, Text, View, Animated, Dimensions, PanResponder } from 'react-native';
import { connect } from "react-redux";
import CardError from '../../../assets/SVG/bankerror.svg';
import RightPolygon from "../../../assets/SVG/RightPolygon.svg";
import { FONT_FAMILY } from "@utils";
const SCREEN_HEIGHT = 140
const SCREEN_WIDTH = Dimensions.get('window').width
import React, { Component } from 'react';
import { StyleSheet, Text, View, Animated, Dimensions, PanResponder } from 'react-native';
import { connect } from "react-redux";
import CardError from '../../../assets/SVG/bankerror.svg';
import RightPolygon from "../../../assets/SVG/RightPolygon.svg";
import { FONT_FAMILY } from "@utils";
const SCREEN_HEIGHT = 140
const SCREEN_WIDTH = Dimensions.get('window').width
class TwitterSwipe extends Component {
}
Above code is for the red box. I am just rendering this UI in another Component class.
My requirement is to just make the red box items swipeable in left and right.
Help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions