]> git.ktnx.net Git - mobile-ledger.git/commitdiff
NT: better alignment anchoring when hiding comment
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 25 Apr 2020 20:02:00 +0000 (23:02 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 25 Apr 2020 20:02:00 +0000 (23:02 +0300)
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java
app/src/main/res/layout/new_transaction_row.xml

index 3a75760718d102f882f9ed3956f2b2331e7e8991..70819ebedcbc3aeafa0482aabf930b2d683c92bb 100644 (file)
@@ -444,11 +444,11 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder
             commentButton.setLayoutParams(lp);
         }
         else {
-            // hiding; hide the comment comment view and align amounts layout under it
+            // hiding; hide the comment view and align the comment bottom to the amount
             tvComment.setVisibility(View.GONE);
             ConstraintLayout.LayoutParams lp =
                     (ConstraintLayout.LayoutParams) commentButton.getLayoutParams();
-            lp.bottomToBottom = R.id.ntr_account;   // R.id.parent doesn't work here
+            lp.bottomToBottom = R.id.amount_layout;   // R.id.parent doesn't work here
 
             commentButton.setLayoutParams(lp);
         }
index 65814a79a3779d0008c7ed72a9fee04a041c23b7..90944e2c3d5f73260b272645d3d38c20fe0832b0 100644 (file)
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:background="@drawable/ic_comment_gray_24dp"
-            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintBottom_toBottomOf="@id/amount_layout"
             app:layout_constraintStart_toStartOf="@+id/ntr_account"
             app:layout_constraintTop_toBottomOf="@+id/account_row_acc_name" />