1.0.10 • Published 6 years ago

react-native-swipeout-longpressforandroid v1.0.10

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-native-swipeout-longpressforandroid

npm npm

I added Long press Android behavior with using awesome Action Sheet libarary on awesome Swipeout library. Because "Swipe to delete" action is not compatible for Android since it has horizontal scrollable tab navigation.

Now it works like this.

react-native-swipeout-longpressforandroid

Getting started

$ npm install react-native-swipeout-longpressforandroid

Manual installation

Just replace your current code like below. That's it.

//import Swipeout from 'react-native-swipeout';
-> import LongPressForAndroidSwipeout from 'react-native-swipeout-longpressforandroid'


/*<Swipeout ...>
    ...
</Swipeout>*/
->
<LongPressForAndroidSwipeout ...>
    ...
</LongPressForAndroidSwipeout>

Usage

Swipeout-LongPressforAndroid is extension of Swipeout, so please look documentation for basic usage from Swipeout.

Props for Android

PropertyTypeDefaultDescription
AndroidTitlestringTitle for question on top. If it's not assigned, question will not be shown.
AndroidCancelbuttonTitlestring"Cancel"Title for cancel button.
AndroidTextColorstringButton title color for normal button except destructive button.
AndroidDestructiveButtonIndexnumberButton on this index will go with red color.

Contribution

I'm very new to React Native and Javascript. So I need your help. Please feel free to make this together.