From: Damyan Ivanov Date: Sat, 12 Jan 2019 14:34:41 +0000 (+0000) Subject: fix transaction colouring to ignore delimiter items X-Git-Tag: v0.3~47 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=11c8dff16901782f69287854cb4788ddf8d932c2;p=mobile-ledger.git fix transaction colouring to ignore delimiter items --- diff --git a/app/src/main/java/net/ktnx/mobileledger/MobileLedgerApplication.java b/app/src/main/java/net/ktnx/mobileledger/MobileLedgerApplication.java index 804575b4..6550765b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/MobileLedgerApplication.java +++ b/app/src/main/java/net/ktnx/mobileledger/MobileLedgerApplication.java @@ -64,14 +64,14 @@ public class MobileLedgerApplication extends Application { Resources rm = getResources(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { Resources.Theme theme = getTheme(); - Globals.tableRowOddBG = rm.getColor(R.color.table_row_odd_bg, theme); - Globals.tableRowEvenBG = rm.getColor(R.color.table_row_even_bg, theme); + Globals.tableRowDarkBG = rm.getColor(R.color.table_row_dark_bg, theme); + Globals.tableRowLightBG = rm.getColor(R.color.table_row_light_bg, theme); Globals.primaryDark = rm.getColor(R.color.design_default_color_primary_dark, theme); Globals.defaultTextColor = rm.getColor(android.R.color.tab_indicator_text, theme); } else { - Globals.tableRowOddBG = rm.getColor(R.color.table_row_odd_bg); - Globals.tableRowEvenBG = rm.getColor(R.color.table_row_even_bg); + Globals.tableRowDarkBG = rm.getColor(R.color.table_row_dark_bg); + Globals.tableRowLightBG = rm.getColor(R.color.table_row_light_bg); Globals.primaryDark = rm.getColor(R.color.design_default_color_primary_dark); Globals.defaultTextColor = rm.getColor(android.R.color.tab_indicator_text); } diff --git a/app/src/main/java/net/ktnx/mobileledger/async/UpdateTransactionsTask.java b/app/src/main/java/net/ktnx/mobileledger/async/UpdateTransactionsTask.java index b039b115..f58d3e5c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/UpdateTransactionsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/UpdateTransactionsTask.java @@ -60,6 +60,7 @@ public class UpdateTransactionsTask extends AsyncTask= Build.VERSION_CODES.M) holder.row - .setBackgroundColor(rm.getColor(R.color.table_row_even_bg, ctx.getTheme())); - else holder.row.setBackgroundColor(rm.getColor(R.color.table_row_even_bg)); + .setBackgroundColor(rm.getColor(R.color.table_row_dark_bg, ctx.getTheme())); + else holder.row.setBackgroundColor(rm.getColor(R.color.table_row_dark_bg)); } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) holder.row diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 07e5cbf0..e079399e 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -234,10 +234,10 @@ public class MainActivity extends AppCompatActivity { public void markDrawerItemCurrent(int id) { TextView item = drawer.findViewById(id); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - item.setBackgroundColor(getResources().getColor(R.color.table_row_even_bg, getTheme())); + item.setBackgroundColor(getResources().getColor(R.color.table_row_dark_bg, getTheme())); } else { - item.setBackgroundColor(getResources().getColor(R.color.table_row_even_bg)); + item.setBackgroundColor(getResources().getColor(R.color.table_row_dark_bg)); } @ColorInt int transparent = getResources().getColor(android.R.color.transparent); diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java index e265ee4a..6c245644 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java @@ -63,7 +63,8 @@ public class TransactionListAdapter extends RecyclerView.Adapter