File tree Expand file tree Collapse file tree
java/org/gnucash/android/ui/transaction Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ public class TransactionDetailActivity extends PasscodeLockActivity {
5454
5555 private String mTransactionUID ;
5656 private String mAccountUID ;
57+ private int mDetailTableRows ;
5758
5859 public static final int REQUEST_EDIT_TRANSACTION = 0x10 ;
5960
@@ -126,6 +127,7 @@ private void bindViews(){
126127 TextView balanceTextView = accountBalance .isNegative () ? mDebitBalance : mCreditBalance ;
127128 TransactionsActivity .displayBalance (balanceTextView , accountBalance );
128129
130+ mDetailTableRows = mDetailTableLayout .getChildCount ();
129131 boolean useDoubleEntry = GnuCashApplication .isDoubleEntryEnabled ();
130132 LayoutInflater inflater = LayoutInflater .from (this );
131133 int index = 0 ;
@@ -175,8 +177,8 @@ private void refresh(){
175177 * Remove the split item views from the transaction detail prior to refreshing them
176178 */
177179 private void removeSplitItemViews (){
178- long splitCount = TransactionsDbAdapter . getInstance (). getSplitCount ( mTransactionUID );
179- mDetailTableLayout .removeViews (0 , ( int ) splitCount );
180+ // Remove all rows that are not special.
181+ mDetailTableLayout .removeViews (0 , mDetailTableLayout . getChildCount () - mDetailTableRows );
180182 mDebitBalance .setText ("" );
181183 mCreditBalance .setText ("" );
182184 }
Original file line number Diff line number Diff line change 7373 android : stretchColumns =" 1"
7474 android : orientation =" vertical" >
7575
76- <TableRow android : layout_width =" match_parent"
76+ <TableRow android : id =" @+id/row_balance"
77+ android : layout_width =" match_parent"
7778 android : layout_height =" wrap_content"
7879 android : weightSum =" 5"
7980 android : paddingTop =" 5dp"
Original file line number Diff line number Diff line change 1616-->
1717<TableRow xmlns : tools =" http://schemas.android.com/tools"
1818 xmlns : android =" http://schemas.android.com/apk/res/android"
19+ android : id =" @+id/row_split_amount_info"
1920 android : layout_width =" match_parent"
2021 android : layout_height =" wrap_content"
2122 android : weightSum =" 5"
You can’t perform that action at this time.
0 commit comments