Skip to content

Commit 7914ed7

Browse files
nbradburyclaude
andcommitted
Fix blog section spacing between avatar and text
Chain blog name and author vertically against the avatar, add marginStart with goneMarginStart so text aligns flush when there is no avatar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 17a6afc commit 7914ed7

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

WordPress/src/main/res/layout/reader_blog_section_view_new.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<ImageView
1111
android:id="@+id/blog_section_image_blog_avatar"
1212
style="@style/ReaderImageView.Avatar.OvalSurfaceBackground"
13-
android:layout_marginEnd="@dimen/margin_medium"
1413
android:importantForAccessibility="no"
1514
app:layout_constraintStart_toStartOf="parent"
1615
app:layout_constraintTop_toTopOf="parent"
@@ -31,12 +30,15 @@
3130
style="@style/ReaderTextView.PostDetail.BlogSection.Title"
3231
android:layout_width="0dp"
3332
android:layout_height="wrap_content"
33+
android:layout_marginStart="@dimen/margin_large"
3434
android:layout_marginEnd="@dimen/margin_medium"
3535
android:includeFontPadding="false"
36+
app:layout_goneMarginStart="0dp"
3637
app:layout_constraintStart_toEndOf="@id/blog_section_image_blog_avatar"
3738
app:layout_constraintEnd_toEndOf="parent"
3839
app:layout_constraintTop_toTopOf="@id/blog_section_image_blog_avatar"
39-
app:layout_constraintBottom_toBottomOf="@id/blog_section_image_blog_avatar"
40+
app:layout_constraintBottom_toTopOf="@id/blog_section_text_author"
41+
app:layout_constraintVertical_chainStyle="packed"
4042
tools:text="My Blog Name" />
4143

4244
<com.google.android.material.textview.MaterialTextView
@@ -51,7 +53,8 @@
5153
android:textAlignment="viewStart"
5254
app:layout_constraintStart_toStartOf="@id/blog_section_text_blog_name"
5355
app:layout_constraintEnd_toEndOf="parent"
54-
app:layout_constraintTop_toBottomOf="@id/blog_section_image_blog_avatar"
56+
app:layout_constraintTop_toBottomOf="@id/blog_section_text_blog_name"
57+
app:layout_constraintBottom_toBottomOf="@id/blog_section_image_blog_avatar"
5558
tools:text="Author Name" />
5659

5760
<com.google.android.material.textview.MaterialTextView

0 commit comments

Comments
 (0)