[MM-18349] Post menu delay animation speed and haptic feedback (#3214)

* Animate backdrop opacity in slide up panel

* Set delayLongPress to 75ms for post

* Add haptic feedback on slide up of post options

* Ease in slide up animation

* Add haptic feedback to android

* reduce long press delay for post options menu

* helper function for haptic feedback

* Add haptic feedback when opening post options menu

* Patch haptic feedback RN module on Android

* Fix tests

* Move hapticFeedback call to SlideUpPanel

* Decrease long press time for reaction
This commit is contained in:
Elias Nahum
2019-09-07 07:45:07 +09:00
committed by GitHub
parent d8adb25640
commit 223bd64a43
14 changed files with 862 additions and 7 deletions

View File

@@ -32,8 +32,9 @@ import com.reactnativedocumentpicker.DocumentPicker;
import com.oblador.keychain.KeychainModule;
import com.reactnativecommunity.asyncstorage.AsyncStorageModule;
import com.reactnativecommunity.netinfo.NetInfoModule;
import com.reactnativecommunity.webview.RNCWebViewPackage;
import com.mkuczera.RNReactNativeHapticFeedbackModule;
import com.reactnativecommunity.webview.RNCWebViewPackage;
import com.brentvatne.react.ReactVideoPackage;
import com.BV.LinearGradient.LinearGradientPackage;
import com.horcrux.svg.SvgPackage;
@@ -151,6 +152,8 @@ public class MainApplication extends NavigationApplication implements INotificat
return new AsyncStorageModule(reactContext);
case NetInfoModule.NAME:
return new NetInfoModule(reactContext);
case "RNReactNativeHapticFeedbackModule":
return new RNReactNativeHapticFeedbackModule(reactContext);
default:
throw new IllegalArgumentException("Could not find module " + name);
}
@@ -184,6 +187,7 @@ public class MainApplication extends NavigationApplication implements INotificat
map.put("RNKeychainManager", new ReactModuleInfo("RNKeychainManager", "com.oblador.keychain.KeychainModule", false, false, true, false, false));
map.put(AsyncStorageModule.NAME, new ReactModuleInfo(AsyncStorageModule.NAME, "com.reactnativecommunity.asyncstorage.AsyncStorageModule", false, false, false, false, false));
map.put(NetInfoModule.NAME, new ReactModuleInfo(NetInfoModule.NAME, "com.reactnativecommunity.netinfo.NetInfoModule", false, false, false, false, false));
map.put("RNReactNativeHapticFeedbackModule", new ReactModuleInfo("RNReactNativeHapticFeedback", "com.mkuczera.RNReactNativeHapticFeedbackModule", false, false, false, false, false));
return map;
}
};
@@ -194,6 +198,7 @@ public class MainApplication extends NavigationApplication implements INotificat
new LinearGradientPackage(),
new ReactVideoPackage(),
new RNGestureHandlerPackage()
// new RNReactNativeHapticFeedbackPackage()
);
}