blob: 6b97dcee69f6c1e45f8888647daaa15a3efd69c3 [file] [log] [blame]
package com.android.launcher3;
import android.view.MotionEvent;
import android.view.View;
import com.android.launcher3.StylusEventHelper.StylusButtonListener;
/**
* Simple listener that performs a long click on the view after a stylus button press.
*/
public class SimpleOnStylusPressListener implements StylusButtonListener {
private View mView;
public SimpleOnStylusPressListener(View view) {
mView = view;
}
public boolean onPressed(MotionEvent event) {
return mView.isLongClickable() && mView.performLongClick();
}
public boolean onReleased(MotionEvent event) {
return false;
}
}