From 141cbc2b98ae434eb3bcb1252f7c0cc738aae9af Mon Sep 17 00:00:00 2001 From: Uwe Trottmann Date: Fri, 29 Nov 2024 10:31:46 +0100 Subject: [PATCH] Lints: ingore ClickableViewAccessibility warnings --- .../seriesguide/lists/ListsReorderDialogFragment.kt | 5 ++++- .../widgets/dragsortview/DragSortController.java | 5 ++++- .../seriesguide/widgets/dragsortview/DragSortListView.java | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/battlelancer/seriesguide/lists/ListsReorderDialogFragment.kt b/app/src/main/java/com/battlelancer/seriesguide/lists/ListsReorderDialogFragment.kt index 5635c053ff..a457ea45a6 100644 --- a/app/src/main/java/com/battlelancer/seriesguide/lists/ListsReorderDialogFragment.kt +++ b/app/src/main/java/com/battlelancer/seriesguide/lists/ListsReorderDialogFragment.kt @@ -1,8 +1,9 @@ -// Copyright 2023 Uwe Trottmann // SPDX-License-Identifier: Apache-2.0 +// Copyright 2015-2024 Uwe Trottmann package com.battlelancer.seriesguide.lists +import android.annotation.SuppressLint import android.app.Dialog import android.content.DialogInterface import android.os.Bundle @@ -24,6 +25,8 @@ class ListsReorderDialogFragment : AppCompatDialogFragment() { private var binding: DialogListsReorderBinding? = null private lateinit var adapter: ListsAdapter + // ClickableViewAccessibility: there is nothing to click + @SuppressLint("ClickableViewAccessibility") override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { val binding = DialogListsReorderBinding.inflate(layoutInflater) this.binding = binding diff --git a/widgets/src/main/java/com/uwetrottmann/seriesguide/widgets/dragsortview/DragSortController.java b/widgets/src/main/java/com/uwetrottmann/seriesguide/widgets/dragsortview/DragSortController.java index 21ef99a0cb..bf84440eaa 100644 --- a/widgets/src/main/java/com/uwetrottmann/seriesguide/widgets/dragsortview/DragSortController.java +++ b/widgets/src/main/java/com/uwetrottmann/seriesguide/widgets/dragsortview/DragSortController.java @@ -1,8 +1,9 @@ -// Copyright 2014, 2015, 2017-2019 Uwe Trottmann // SPDX-License-Identifier: Apache-2.0 +// Copyright 2014-2024 Uwe Trottmann package com.uwetrottmann.seriesguide.widgets.dragsortview; +import android.annotation.SuppressLint; import android.graphics.Point; import android.view.GestureDetector; import android.view.HapticFeedbackConstants; @@ -238,6 +239,8 @@ public boolean startDrag(int position, int deltaX, int deltaY) { return mDragging; } + // ClickableViewAccessibility: there is nothing to click + @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouch(View v, MotionEvent ev) { if (!mDslv.isDragEnabled() || mDslv.listViewIntercepted()) { diff --git a/widgets/src/main/java/com/uwetrottmann/seriesguide/widgets/dragsortview/DragSortListView.java b/widgets/src/main/java/com/uwetrottmann/seriesguide/widgets/dragsortview/DragSortListView.java index 0fb43e1ddb..5d4c1106e7 100644 --- a/widgets/src/main/java/com/uwetrottmann/seriesguide/widgets/dragsortview/DragSortListView.java +++ b/widgets/src/main/java/com/uwetrottmann/seriesguide/widgets/dragsortview/DragSortListView.java @@ -1,6 +1,6 @@ -// Copyright 2012 Carl Bauer -// Copyright 2014, 2015, 2017-2019 Uwe Trottmann // SPDX-License-Identifier: Apache-2.0 +// Copyright 2012 Carl Bauer +// Copyright 2014-2024 Uwe Trottmann package com.uwetrottmann.seriesguide.widgets.dragsortview; @@ -1522,6 +1522,8 @@ public boolean stopDrag(boolean remove, float velocityX) { } } + // ClickableViewAccessibility: there is nothing to click + @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(MotionEvent ev) { if (mIgnoreTouchEvent) {