private void testStartDrag(View v) {
View.DragShadowBuilder dragShadowBuilder = new View.DragShadowBuilder(v);
v.setOnDragListener(new View.OnDragListener() {
@Override
public boolean onDrag(View v,DragEvent event) {
return false;
}
});
v.startDrag(null,dragShadowBuilder,null,0);
//震动反馈
v.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
}
网友评论