package net.ktnx.mobileledger.ui.transaction_list;
+import android.app.Activity;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Typeface;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.StyleSpan;
-import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
-import androidx.appcompat.widget.AppCompatTextView;
import androidx.recyclerview.widget.RecyclerView;
import net.ktnx.mobileledger.App;
import java.util.GregorianCalendar;
import java.util.TimeZone;
-import static net.ktnx.mobileledger.utils.DimensionUtils.dp2px;
-
public class TransactionListAdapter extends RecyclerView.Adapter<TransactionRowHolder> {
public void onBindViewHolder(@NonNull TransactionRowHolder holder, int position) {
TransactionListItem item = TransactionListViewModel.getTransactionListItem(position);
if (row == null) {
LayoutInflater inflater = ((Activity) ctx).getLayoutInflater();
row = (LinearLayout) inflater.inflate(
- R.layout.transaction_list_row_accounts_table_row,
- holder.tableAccounts);
+ R.layout.transaction_list_row_accounts_table_row, null);
+ // if the rootView above is given (and the line below is spared)
+ // the accounts remain with their default text (set in the layout resource)
+ holder.tableAccounts.addView(row);
}
TextView accName = row.findViewById(R.id.transaction_list_acc_row_acc_name);
TextView accComment =