From 57adc934057ab7d15c9f8e98df2fee7c441d47a4 Mon Sep 17 00:00:00 2001 From: JeanGarf Date: Thu, 27 Feb 2020 17:36:27 +0100 Subject: [PATCH] Fixes #871 Display inherited color from ancestor's account on the Strip View --- .../gnucash/android/ui/account/AccountsListFragment.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/gnucash/android/ui/account/AccountsListFragment.java b/app/src/main/java/org/gnucash/android/ui/account/AccountsListFragment.java index a83ab10bc..fdcbcf9ee 100644 --- a/app/src/main/java/org/gnucash/android/ui/account/AccountsListFragment.java +++ b/app/src/main/java/org/gnucash/android/ui/account/AccountsListFragment.java @@ -23,9 +23,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.database.Cursor; -import android.graphics.Color; import android.os.AsyncTask; -import android.os.Build; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.LoaderManager.LoaderCallbacks; @@ -499,11 +497,11 @@ public void onBindViewHolderCursor(final AccountViewHolder holder, final Cursor // add a summary of transactions to the account view - // Make sure the balance task is truly multithread + // Make sure the balance task is truly multithread new AccountBalanceTask(holder.accountBalance).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, accountUID); - String accountColor = cursor.getString(cursor.getColumnIndexOrThrow(DatabaseSchema.AccountEntry.COLUMN_COLOR_CODE)); - int colorCode = accountColor == null ? Color.TRANSPARENT : Color.parseColor(accountColor); + // #871 Display inherited color from ancestor's account on the Strip View + int colorCode = AccountsDbAdapter.getActiveAccountColorResource(accountUID); holder.colorStripView.setBackgroundColor(colorCode); boolean isPlaceholderAccount = mAccountsDbAdapter.isPlaceholderAccount(accountUID);