Skip to content

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

Description

@Niki01Rud

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😊

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions