mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-06 05:31:27 +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.setText(button.getText());
|
||||||
toolButton.setOnClickListener(view -> ToolsLauncher.launch(parent.getContext(), button.getActivity()));
|
toolButton.setOnClickListener(view -> ToolsLauncher.launch(parent.getContext(), button.getActivity()));
|
||||||
toolButton.setOnTouchListener((view, motionEvent) -> {
|
toolButton.setOnTouchListener((view, motionEvent) -> {
|
||||||
|
|
||||||
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
|
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
|
||||||
view.animate().translationZ(8f).setDuration(100L);
|
view.animate().translationZ(8f).setDuration(100L);
|
||||||
}
|
}else {
|
||||||
if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
|
|
||||||
view.animate().translationZ(0).setDuration(100L);
|
view.animate().translationZ(0).setDuration(100L);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user