From: Damyan Ivanov Date: Tue, 16 Feb 2021 20:21:05 +0000 (+0200) Subject: silence click-accessibility warning X-Git-Tag: v0.17.0~111 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=abd8d9d926795e15156d751fc10287caad59c4ae;p=mobile-ledger.git silence click-accessibility warning this view is not clickable --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java index 4ade0e71..e0406446 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java @@ -17,6 +17,7 @@ package net.ktnx.mobileledger.ui.templates; +import android.annotation.SuppressLint; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; @@ -655,6 +656,10 @@ class TemplateDetailsAdapter extends RecyclerView.Adapter b.negateAmountSwitch.toggle(); b.templateDetailsNegateAmountLabel.setOnClickListener(negLabelClickListener); b.templateDetailsNegateAmountText.setOnClickListener(negLabelClickListener); + manageAccountLabelDrag(); + } + @SuppressLint("ClickableViewAccessibility") + public void manageAccountLabelDrag() { b.patternAccountLabel.setOnTouchListener((v, event) -> { if (event.getAction() == MotionEvent.ACTION_DOWN) { itemTouchHelper.startDrag(this); diff --git a/app/src/main/res/layout/template_details_account.xml b/app/src/main/res/layout/template_details_account.xml index a0cae774..83a30773 100644 --- a/app/src/main/res/layout/template_details_account.xml +++ b/app/src/main/res/layout/template_details_account.xml @@ -36,6 +36,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="1.0" app:layout_constraintTop_toTopOf="parent" + android:clickable="false" />