在android滑环解锁中,当按下时会发生振动效应,因此控制设置的振动效应不会绑定在设置中,设置的触摸振动开关来取消振动效应,下面是武林技术频道小编为大家介绍的android滑动解锁震动效果的开启和取消,一起进入下文了解一下吧!
MultiWaveViewMethods multiWaveViewMethods = new MultiWaveViewMethods(multiWaveView);
multiWaveView.setOnTriggerListener(multiWaveViewMethods);
mUnlockWidgetMethods = multiWaveViewMethods;
还要在这里加入
private final MultiWaveView mMultiWaveView;
private boolean mCameraDisabled;
MultiWaveViewMethods(MultiWaveView multiWaveView) {
mMultiWaveView = multiWaveView;
multiWaveView.setVibrateEnabled(Settings.System.getInt(mContext.getContentResolver(),
Settings.System.HAPTIC_FEEDBACK_ENABLED, 1) != 0);
final boolean cameraDisabled = mLockPatternUtils.getDevicePolicyManager()
.getCameraDisabled(null);
以上代码都是武林技术频道小编为大家搜集的android滑动解锁震动效果的开启和取消,希望对大家的学习有一定的帮助!
新闻热点
疑难解答