/*
- * Copyright © 2021 Damyan Ivanov.
+ * Copyright © 2024 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
import android.view.View;
+import androidx.constraintlayout.widget.ConstraintLayout;
+
import net.ktnx.mobileledger.App;
import net.ktnx.mobileledger.databinding.TransactionDelimiterBinding;
import net.ktnx.mobileledger.model.TransactionListItem;
+import net.ktnx.mobileledger.utils.DimensionUtils;
import net.ktnx.mobileledger.utils.Globals;
import net.ktnx.mobileledger.utils.SimpleDate;
b.transactionDelimiterMonth.setText(
Globals.monthNames[cal.get(GregorianCalendar.MONTH)]);
b.transactionDelimiterMonth.setVisibility(View.VISIBLE);
- // holder.vDelimiterLine.setBackgroundResource(R.drawable
- // .dashed_border_8dp);
b.transactionDelimiterThick.setVisibility(View.VISIBLE);
+ ConstraintLayout.LayoutParams lp =
+ (ConstraintLayout.LayoutParams) b.transactionDelimiterThick.getLayoutParams();
+ lp.height = DimensionUtils.dp2px(b.getRoot()
+ .getContext(), 4);
+ b.transactionDelimiterThick.setLayoutParams(lp);
}
else {
b.transactionDelimiterMonth.setVisibility(View.GONE);
- // holder.vDelimiterLine.setBackgroundResource(R.drawable
- // .dashed_border_1dp);
- b.transactionDelimiterThick.setVisibility(View.GONE);
+ ConstraintLayout.LayoutParams lp =
+ (ConstraintLayout.LayoutParams) b.transactionDelimiterThick.getLayoutParams();
+ lp.height = DimensionUtils.dp2px(b.getRoot()
+ .getContext(), 1.3f);
+ b.transactionDelimiterThick.setLayoutParams(lp);
+ b.transactionDelimiterThick.setVisibility(View.VISIBLE);
}
}