]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java
fix handling the click on the account expander image
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / MainActivity.java
index 77a56c35325dc5d6533799565d9c80aa401bd0a9..d711247b5b5cdca63faa36dada771761b6b0ca16 100644 (file)
@@ -677,10 +677,14 @@ public class MainActivity extends ProfileThemedActivity {
 
     }
     public void onAccountSummaryRowViewClicked(View view) {
-        ViewGroup row = (ViewGroup) view.getParent();
+        ViewGroup row;
+        if ( view.getId() == R.id.account_expander ) row = (ViewGroup) view.getParent().getParent();
+        else row = (ViewGroup) view.getParent();
+
         LedgerAccount acc = (LedgerAccount) row.getTag();
         switch (view.getId()) {
             case R.id.account_row_acc_name:
+            case R.id.account_expander:
             case R.id.account_expander_container:
                 Log.d("accounts", "Account expander clicked");
                 if (!acc.hasSubAccounts()) return;