]> git.ktnx.net Git - mobile-ledger.git/commitdiff
silence click-accessibility warning
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 16 Feb 2021 20:21:05 +0000 (22:21 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 18 Feb 2021 07:19:43 +0000 (07:19 +0000)
this view is not clickable

app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java
app/src/main/res/layout/template_details_account.xml

index 4ade0e718fcd066b15f7dc9eb7a218491a142d55..e0406446485cfbbf7896ddd9dae079dced9f7b54 100644 (file)
@@ -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<TemplateDetailsAdapter
                     (view) -> 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);
index a0cae77467a260268830fc13cdac16202087b154..83a307738349d15da8bc23ebf662ded50deab6bd 100644 (file)
@@ -36,6 +36,7 @@
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="1.0"
         app:layout_constraintTop_toTopOf="parent"
+        android:clickable="false"
         />
     <TextView
         android:id="@+id/template_account_name_source_label"