Skip to content

Commit b561ff8

Browse files
Merge pull request #344 from appdevforall/fix/ADFA-5026-rebuild-hint-margins
ADFA-5026: align the 'no rebuild needed' hint with the card margins
2 parents 4213fe2 + 1a407f3 commit b561ff8

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎controller/app/src/main/java/org/iiab/controller/redesign/DashboardDetailFragment.java‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,14 @@ private TextView buildRebuildHint(Button rebuildBtn) {
124124
hint.setText(R.string.k2go_dash_uptodate_hint);
125125
hint.setTextAppearance(com.google.android.material.R.style.TextAppearance_Material3_BodySmall);
126126
hint.setTextColor(ContextCompat.getColor(requireContext(), R.color.k2go_muted));
127-
int pad = Math.round(4 * d);
128-
hint.setPadding(0, pad, 0, pad);
127+
// Align with the body text + Rebuild button (both inset 20dp); left-aligned like the rest.
128+
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
129+
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
130+
int side = Math.round(20 * d);
131+
lp.leftMargin = side;
132+
lp.rightMargin = side;
133+
lp.topMargin = Math.round(8 * d);
134+
hint.setLayoutParams(lp);
129135
hint.setVisibility(View.GONE);
130136
parent.addView(hint, parent.indexOfChild(rebuildBtn));
131137
return hint;

0 commit comments

Comments
 (0)