Fix home header logo and title layout (#11)

Use the current logo asset and a fixed-size custom toolbar layout so the home title and tagline stay aligned.
This commit is contained in:
Mr.Karzari
2026-07-23 22:40:22 +03:30
committed by GitHub
parent 00cc4ebde3
commit e4b4f6e350
2 changed files with 48 additions and 10 deletions
@@ -197,8 +197,7 @@ class FridaBoxActivity : AppCompatActivity() {
gravity = Gravity.CENTER_HORIZONTAL
setPadding(dp(24), dp(36), dp(24), dp(36))
addView(ImageView(this@FridaBoxActivity).apply {
setImageResource(R.drawable.ic_fridabox_mark)
imageTintList = ColorStateList.valueOf(color(R.color.fb_text_secondary))
setImageResource(R.drawable.logo)
}, LinearLayout.LayoutParams(dp(52), dp(52)))
addView(labelText(getString(R.string.fb_no_guests), R.color.fb_text_primary, 19f, true).apply {
setPadding(0, dp(16), 0, 0)
+47 -8
View File
@@ -22,14 +22,53 @@
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@color/fb_background"
android:contentInsetStart="18dp"
android:contentInsetEnd="18dp"
app:logo="@drawable/ic_fridabox_mark"
app:logoDescription="@string/fb_brand"
app:subtitle="@string/fb_brand_tagline"
app:subtitleTextColor="@color/fb_text_secondary"
app:title="@string/fb_brand"
app:titleTextColor="@color/fb_text_primary" />
android:contentInsetStart="0dp"
android:contentInsetEnd="0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layoutDirection="ltr"
android:orientation="horizontal"
android:paddingStart="18dp"
android:paddingEnd="18dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/fb_brand"
android:scaleType="centerInside"
android:src="@drawable/logo" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="@string/fb_brand"
android:textColor="@color/fb_text_primary"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/fb_brand_tagline"
android:textColor="@color/fb_text_secondary"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>
</com.google.android.material.appbar.MaterialToolbar>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView