Skip to content

Commit 6df8518

Browse files
committed
Compact About header - horizontal layout, smaller icon, fits in one screen
1 parent 64527d3 commit 6df8518

File tree

1 file changed

+38
-63
lines changed

1 file changed

+38
-63
lines changed

app/src/main/res/layout/fragment_about.xml

Lines changed: 38 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,21 @@
1515
android:layout_height="wrap_content"
1616
android:orientation="vertical">
1717

18-
<!-- Hero Header -->
18+
<!-- Compact Header -->
1919
<LinearLayout
2020
android:layout_width="match_parent"
2121
android:layout_height="wrap_content"
22-
android:orientation="vertical"
23-
android:gravity="center"
24-
android:paddingTop="40dp"
25-
android:paddingBottom="32dp"
26-
android:paddingHorizontal="24dp"
22+
android:orientation="horizontal"
23+
android:gravity="center_vertical"
24+
android:paddingVertical="16dp"
25+
android:paddingHorizontal="20dp"
2726
android:background="@drawable/bg_about_header">
2827

2928
<com.google.android.material.card.MaterialCardView
30-
android:layout_width="88dp"
31-
android:layout_height="88dp"
32-
app:cardCornerRadius="20dp"
33-
app:cardElevation="8dp">
29+
android:layout_width="56dp"
30+
android:layout_height="56dp"
31+
app:cardCornerRadius="14dp"
32+
app:cardElevation="4dp">
3433

3534
<ImageView
3635
android:layout_width="match_parent"
@@ -40,66 +39,42 @@
4039
android:contentDescription="@string/app_icon_desc" />
4140
</com.google.android.material.card.MaterialCardView>
4241

43-
<TextView
44-
android:layout_width="wrap_content"
42+
<LinearLayout
43+
android:layout_width="0dp"
4544
android:layout_height="wrap_content"
46-
android:layout_marginTop="16dp"
47-
android:text="@string/app_name"
48-
android:textSize="28sp"
49-
android:textStyle="bold"
50-
android:textColor="@android:color/white" />
45+
android:layout_weight="1"
46+
android:layout_marginStart="16dp"
47+
android:orientation="vertical">
5148

52-
<TextView
53-
android:id="@+id/tvVersion"
54-
android:layout_width="wrap_content"
55-
android:layout_height="wrap_content"
56-
android:layout_marginTop="4dp"
57-
android:textColor="@android:color/white"
58-
android:alpha="0.8" />
49+
<TextView
50+
android:layout_width="wrap_content"
51+
android:layout_height="wrap_content"
52+
android:text="@string/app_name"
53+
android:textSize="20sp"
54+
android:textStyle="bold"
55+
android:textColor="@android:color/white" />
5956

60-
<TextView
61-
android:layout_width="wrap_content"
62-
android:layout_height="wrap_content"
63-
android:layout_marginTop="12dp"
64-
android:text="@string/about_tagline"
65-
android:textColor="@android:color/white"
66-
android:alpha="0.9"
67-
android:textSize="15sp"
68-
android:gravity="center" />
57+
<TextView
58+
android:id="@+id/tvVersion"
59+
android:layout_width="wrap_content"
60+
android:layout_height="wrap_content"
61+
android:textColor="@android:color/white"
62+
android:alpha="0.8"
63+
android:textSize="12sp" />
64+
</LinearLayout>
6965

7066
<!-- Mode Badge -->
71-
<com.google.android.material.card.MaterialCardView
67+
<TextView
68+
android:id="@+id/tvCurrentMode"
7269
android:layout_width="wrap_content"
7370
android:layout_height="wrap_content"
74-
android:layout_marginTop="16dp"
75-
app:cardCornerRadius="20dp"
76-
app:cardElevation="0dp"
77-
app:cardBackgroundColor="#33FFFFFF">
78-
79-
<LinearLayout
80-
android:layout_width="wrap_content"
81-
android:layout_height="wrap_content"
82-
android:orientation="horizontal"
83-
android:gravity="center_vertical"
84-
android:paddingHorizontal="16dp"
85-
android:paddingVertical="8dp">
86-
87-
<View
88-
android:id="@+id/modeIndicator"
89-
android:layout_width="8dp"
90-
android:layout_height="8dp"
91-
android:background="@drawable/dot_active" />
92-
93-
<TextView
94-
android:id="@+id/tvCurrentMode"
95-
android:layout_width="wrap_content"
96-
android:layout_height="wrap_content"
97-
android:layout_marginStart="8dp"
98-
android:textColor="@android:color/white"
99-
android:textSize="13sp"
100-
android:textStyle="bold" />
101-
</LinearLayout>
102-
</com.google.android.material.card.MaterialCardView>
71+
android:paddingHorizontal="12dp"
72+
android:paddingVertical="6dp"
73+
android:background="@drawable/rounded_bg"
74+
android:backgroundTint="#33FFFFFF"
75+
android:textColor="@android:color/white"
76+
android:textSize="11sp"
77+
android:textStyle="bold" />
10378
</LinearLayout>
10479

10580
<!-- Content -->

0 commit comments

Comments
 (0)