import android.widget.LinearLayout;
import android.widget.TextView;
+import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
// the accounts remain with their default text (set in the layout resource)
holder.tableAccounts.addView(row);
}
+ TextView dummyText = row.findViewById(R.id.dummy_text);
TextView accName = row.findViewById(R.id.transaction_list_acc_row_acc_name);
TextView accComment =
row.findViewById(R.id.transaction_list_acc_row_acc_comment);
accName.setText(ss);
}
else {
- accName.setTextColor(Colors.defaultTextColor);
- accAmount.setTextColor(Colors.defaultTextColor);
+ @ColorInt int textColor = dummyText.getTextColors()
+ .getDefaultColor();
+ accName.setTextColor(textColor);
+ accAmount.setTextColor(textColor);
accName.setText(acc.getAccountName());
}