if (position % 2 == 0) {
if (Build.VERSION.SDK_INT >= 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
void toggleChildrenOf(LedgerAccount parent, boolean hiddenToBe, int parentPosition) {
int i = parentPosition + 1;
for (LedgerAccount acc : Data.accounts.get()) {
- String acc_parent = acc.getParentName();
- if ((acc_parent != null) && acc.getParentName().equals(parent.getName())) {
+ if (acc.getName().startsWith(parent.getName() + ":")) {
acc.setHiddenToBe(hiddenToBe);
notifyItemChanged(i);
toggleChildrenOf(acc, hiddenToBe, i);