mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-06 02:41:28 +08:00
Fixed the bug that the floating animation of the tool button could not be automatically restored
This commit is contained in:
@@ -44,11 +44,9 @@ public class ToolsAdapter extends RecyclerView.Adapter<ToolsAdapter.ViewHolder>
|
||||
toolButton.setText(button.getText());
|
||||
toolButton.setOnClickListener(view -> ToolsLauncher.launch(parent.getContext(), button.getActivity()));
|
||||
toolButton.setOnTouchListener((view, motionEvent) -> {
|
||||
|
||||
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
view.animate().translationZ(8f).setDuration(100L);
|
||||
}
|
||||
if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
|
||||
}else {
|
||||
view.animate().translationZ(0).setDuration(100L);
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user