Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to drag and drop in Android 10. #234

Open
Niki01Rud opened this issue Dec 15, 2021 · 2 comments
Open

not able to drag and drop in Android 10. #234

Niki01Rud opened this issue Dec 15, 2021 · 2 comments

Comments

@Niki01Rud
Copy link

Niki01Rud commented Dec 15, 2021

used "react-native-sortable-list": "^0.0.24", it's working fine in IOS and android except android 10 OS. not able to drag list item.

Attaching my code for reference.

const window = Dimensions.get('window');

const data = {
0: {
text: '734058957879',
},
1: {
text: '676766545467',
},
2: {
text: '7643666745467',
},

};

export default class Basic extends Component {
render() {
return (



);
}

_renderRow = ({ data, active }) => {
console.log("_renderRow navigation :", this.props.navigation)
return
}
}

class Row extends Component {

constructor(props) {
super(props);
const { navigation } = props.navigation;
this._active = new Animated.Value(0);

this._style = {
  ...Platform.select({
    ios: {
      transform: [{
        scale: this._active.interpolate({
          inputRange: [0, 1],
          outputRange: [1, 1.1],
        }),
      }],
      shadowRadius: this._active.interpolate({
        inputRange: [0, 1],
        outputRange: [2, 10],
      }),
    },

    android: {
      transform: [{
        scale: this._active.interpolate({
          inputRange: [0, 1],
          outputRange: [1, 1.07],
        }),
      }],
      elevation: this._active.interpolate({
        inputRange: [0, 1],
        outputRange: [2, 6],
      }),
    },
  })
};

}

componentWillReceiveProps(nextProps) {
if (this.props.active !== nextProps.active) {
Animated.timing(this._active, {
duration: 300,
easing: Easing.bounce,
toValue: Number(nextProps.active),
}).start();
}
}

render() {
const { data, active } = this.props;

return (

    <Animated.View style={[
      styles.row,
      this._style,
    ]}>
      <Text style={styles.text}>Policy Number : </Text>

      <Text style={styles.text}>{data.text}</Text>

    </Animated.View>

);

}
}

please help me to resolve this issue, thanks in advance😊

@MorganTrudeau
Copy link

Yes I see basic example from this repo is not working in android 10.

@PahmCuogn
Copy link

PahmCuogn commented Feb 16, 2022

@Niki01Rud you can apply solution at here it working on my app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants