Skip to content

Commit 876f75f

Browse files
committed
feat(android): brand + accessibility pass on the UI
Branding: brand-indigo Material3 theme (light-only, replacing default purple), swap the Bluetooth icon for the app-icon glasses mark on a dark badge, and reframe the subtitle to 'Reads code aloud through your glasses.' Accessibility (it's an app for blind/low-vision devs): mark the title as a heading, give the logo a contentDescription, raise text contrast (darker status green + onSurfaceVariant for secondary text), pair the green status with a check icon rather than color alone, and wrap the screen in verticalScroll so large font scales / landscape don't clip. Also corrected the folder to 'Download/Meta AI'. Verified locally: compiles, installs, and renders the rebranded screen.
1 parent e06754f commit 876f75f

2 files changed

Lines changed: 84 additions & 40 deletions

File tree

android/app/src/main/kotlin/com/metahelper/app/MainActivity.kt

Lines changed: 65 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,23 @@ import android.util.Log
1212
import androidx.activity.ComponentActivity
1313
import androidx.activity.compose.setContent
1414
import androidx.activity.result.contract.ActivityResultContracts
15+
import androidx.compose.foundation.Image
1516
import androidx.compose.foundation.layout.*
17+
import androidx.compose.foundation.rememberScrollState
1618
import androidx.compose.foundation.shape.CircleShape
19+
import androidx.compose.foundation.shape.RoundedCornerShape
20+
import androidx.compose.foundation.verticalScroll
1721
import androidx.compose.material.icons.Icons
18-
import androidx.compose.material.icons.filled.Bluetooth
22+
import androidx.compose.material.icons.filled.CheckCircle
1923
import androidx.compose.material.icons.filled.Refresh
2024
import androidx.compose.material3.*
2125
import androidx.compose.runtime.*
2226
import androidx.compose.ui.Alignment
2327
import androidx.compose.ui.Modifier
2428
import androidx.compose.ui.graphics.Color
29+
import androidx.compose.ui.res.painterResource
30+
import androidx.compose.ui.semantics.heading
31+
import androidx.compose.ui.semantics.semantics
2532
import androidx.compose.ui.text.style.TextAlign
2633
import androidx.compose.ui.unit.dp
2734
import androidx.core.content.ContextCompat
@@ -150,56 +157,82 @@ fun LoadingScreen(status: String) {
150157
}
151158
}
152159

160+
// Darker green than Material's default for WCAG-AA contrast on the light card.
161+
private val StatusGreen = Color(0xFF2E7D32)
162+
153163
@Composable
154164
fun MainScreen(manager: GlassesManager) {
155165
Column(
156166
modifier = Modifier
157167
.fillMaxSize()
168+
.verticalScroll(rememberScrollState()) // survives large font scale / landscape
158169
.padding(32.dp),
159170
horizontalAlignment = Alignment.CenterHorizontally,
160-
verticalArrangement = Arrangement.spacedBy(24.dp)
171+
verticalArrangement = Arrangement.spacedBy(20.dp)
161172
) {
162-
Column(horizontalAlignment = Alignment.CenterHorizontally) {
163-
Icon(
164-
imageVector = Icons.Default.Bluetooth,
165-
contentDescription = null,
166-
tint = MaterialTheme.colorScheme.primary,
167-
modifier = Modifier.size(48.dp)
168-
)
169-
Text(
170-
text = "MetaHelper",
171-
style = MaterialTheme.typography.displaySmall,
172-
color = MaterialTheme.colorScheme.onBackground
173-
)
174-
Text(
175-
text = "Smart Glasses Companion",
176-
style = MaterialTheme.typography.bodyLarge,
177-
color = MaterialTheme.colorScheme.secondary
173+
Spacer(modifier = Modifier.height(24.dp))
174+
175+
// The app-icon mark on its dark tile, so the light code glyph stays
176+
// legible on the light background.
177+
Surface(
178+
shape = RoundedCornerShape(22.dp),
179+
color = Color(0xFF0B0F1A),
180+
modifier = Modifier.size(88.dp)
181+
) {
182+
Image(
183+
painter = painterResource(R.drawable.ic_launcher_foreground),
184+
contentDescription = "MetaHelper logo",
185+
modifier = Modifier.fillMaxSize()
178186
)
179187
}
180188

181-
Spacer(modifier = Modifier.weight(1f))
189+
Text(
190+
text = "MetaHelper",
191+
style = MaterialTheme.typography.displaySmall,
192+
color = MaterialTheme.colorScheme.onBackground,
193+
modifier = Modifier.semantics { heading() }
194+
)
195+
Text(
196+
text = "Reads code aloud through your glasses.",
197+
style = MaterialTheme.typography.bodyLarge,
198+
color = MaterialTheme.colorScheme.onSurfaceVariant,
199+
textAlign = TextAlign.Center
200+
)
201+
202+
Spacer(modifier = Modifier.height(8.dp))
182203

183204
Card(
184205
modifier = Modifier.fillMaxWidth(),
185206
colors = CardDefaults.cardColors(
186-
containerColor = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.5f)
207+
containerColor = MaterialTheme.colorScheme.surfaceVariant
187208
)
188209
) {
189210
Column(
190211
modifier = Modifier.padding(20.dp),
191-
horizontalAlignment = Alignment.CenterHorizontally
212+
horizontalAlignment = Alignment.CenterHorizontally,
213+
verticalArrangement = Arrangement.spacedBy(10.dp)
192214
) {
215+
Row(verticalAlignment = Alignment.CenterVertically) {
216+
Icon(
217+
imageVector = Icons.Default.CheckCircle,
218+
contentDescription = null, // label conveyed by the adjacent text
219+
tint = StatusGreen,
220+
modifier = Modifier.size(18.dp)
221+
)
222+
Spacer(modifier = Modifier.width(6.dp))
223+
Text(
224+
text = "GALLERY WATCHER ACTIVE",
225+
style = MaterialTheme.typography.labelLarge,
226+
color = StatusGreen
227+
)
228+
}
193229
Text(
194-
text = "GALLERY WATCHER ACTIVE",
195-
style = MaterialTheme.typography.labelLarge,
196-
color = Color(0xFF4CAF50)
197-
)
198-
Spacer(modifier = Modifier.height(8.dp))
199-
Text(
200-
text = "1. Take a photo with your glasses.\n2. Meta AI will save it to 'Downloads/Meta AI'.\n3. MetaHelper will detect it and play the answer!",
230+
text = "1. Take a photo with your glasses.\n" +
231+
"2. Meta AI saves it to 'Download/Meta AI'.\n" +
232+
"3. MetaHelper detects it and plays the answer.",
201233
textAlign = TextAlign.Center,
202-
style = MaterialTheme.typography.bodyMedium
234+
style = MaterialTheme.typography.bodyMedium,
235+
color = MaterialTheme.colorScheme.onSurfaceVariant
203236
)
204237
}
205238
}
@@ -218,8 +251,9 @@ fun MainScreen(manager: GlassesManager) {
218251

219252
Text(
220253
text = "Cloud: Connected to Render",
221-
style = MaterialTheme.typography.labelSmall,
222-
color = MaterialTheme.colorScheme.outline
254+
style = MaterialTheme.typography.labelMedium,
255+
color = MaterialTheme.colorScheme.onSurfaceVariant,
256+
textAlign = TextAlign.Center
223257
)
224258
}
225259
}

android/app/src/main/kotlin/com/metahelper/app/ui/theme/Theme.kt

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,30 @@ package com.metahelper.app.ui.theme
33
import androidx.compose.material3.MaterialTheme
44
import androidx.compose.material3.lightColorScheme
55
import androidx.compose.runtime.Composable
6+
import androidx.compose.ui.graphics.Color
67

7-
private val LightColorScheme = lightColorScheme(
8-
primary = androidx.compose.ui.graphics.Color(0xFF6200EE),
9-
secondary = androidx.compose.ui.graphics.Color(0xFF03DAC6),
10-
tertiary = androidx.compose.ui.graphics.Color(0xFF3700B3)
8+
// Brand palette (matches the banner/app-icon): indigo accent on a light surface.
9+
// Light-only by design — no dark scheme. Colors chosen for WCAG-AA text contrast.
10+
private val BrandColorScheme = lightColorScheme(
11+
primary = Color(0xFF6366F1), // brand indigo
12+
onPrimary = Color(0xFFFFFFFF),
13+
primaryContainer = Color(0xFFE0E7FF),
14+
onPrimaryContainer = Color(0xFF1E1B4B),
15+
secondary = Color(0xFF4F46E5),
16+
onSecondary = Color(0xFFFFFFFF),
17+
background = Color(0xFFF8FAFC),
18+
onBackground = Color(0xFF0B0F1A),
19+
surface = Color(0xFFFFFFFF),
20+
onSurface = Color(0xFF0B0F1A),
21+
surfaceVariant = Color(0xFFEEF1F6),
22+
onSurfaceVariant = Color(0xFF3F4356), // ~8:1 on surfaceVariant
23+
outline = Color(0xFF565B6E),
1124
)
1225

1326
@Composable
14-
fun MetaHelperTheme(
15-
content: @Composable () -> Unit
16-
) {
27+
fun MetaHelperTheme(content: @Composable () -> Unit) {
1728
MaterialTheme(
18-
colorScheme = LightColorScheme,
29+
colorScheme = BrandColorScheme,
1930
content = content
2031
)
2132
}
22-

0 commit comments

Comments
 (0)