|
14 | 14 | import static org.schabi.newpipe.util.NavigationHelper.playWithKore; |
15 | 15 |
|
16 | 16 | import android.animation.ValueAnimator; |
| 17 | +import android.annotation.SuppressLint; |
17 | 18 | import android.app.Activity; |
18 | 19 | import android.content.BroadcastReceiver; |
19 | 20 | import android.content.Context; |
@@ -617,23 +618,20 @@ protected void initViews(final View rootView, final Bundle savedInstanceState) { |
617 | 618 | } |
618 | 619 |
|
619 | 620 | @Override |
| 621 | + @SuppressLint("ClickableViewAccessibility") |
620 | 622 | protected void initListeners() { |
621 | 623 | super.initListeners(); |
622 | 624 |
|
623 | 625 | setOnClickListeners(); |
624 | 626 | setOnLongClickListeners(); |
625 | 627 |
|
626 | 628 | final View.OnTouchListener controlsTouchListener = (view, motionEvent) -> { |
627 | | - if (!PreferenceManager.getDefaultSharedPreferences(activity) |
| 629 | + if (motionEvent.getAction() == MotionEvent.ACTION_DOWN |
| 630 | + && PreferenceManager.getDefaultSharedPreferences(activity) |
628 | 631 | .getBoolean(getString(R.string.show_hold_to_append_key), true)) { |
629 | | - return false; |
630 | | - } |
631 | 632 |
|
632 | | - if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) { |
633 | | - animate(binding.touchAppendDetail, true, 250, AnimationType.ALPHA, |
634 | | - 0, () -> |
635 | | - animate(binding.touchAppendDetail, false, 1500, |
636 | | - AnimationType.ALPHA, 1000)); |
| 633 | + animate(binding.touchAppendDetail, true, 250, AnimationType.ALPHA, 0, () -> |
| 634 | + animate(binding.touchAppendDetail, false, 1500, AnimationType.ALPHA, 1000)); |
637 | 635 | } |
638 | 636 | return false; |
639 | 637 | }; |
|
0 commit comments