From 40e2762d74ec6651e84f905e7d8070a6294bc12c Mon Sep 17 00:00:00 2001 From: Fadi George Date: Fri, 13 Feb 2026 17:28:59 -0800 Subject: [PATCH 1/2] adjust prompt --- examples/build.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/examples/build.md b/examples/build.md index 25381fad1..c63b4c27c 100644 --- a/examples/build.md +++ b/examples/build.md @@ -178,18 +178,23 @@ App Section layout: - Separated from the above toggle by a horizontal divider - NOT a blocking overlay - user can interact with app regardless of state -4. "Logged in as" display (ABOVE the buttons, only visible when logged in): - - Prominent green Card background (#E8F5E9) - - "Logged in as:" label - - External User ID displayed large and centered (bold, green #2E7D32) - - Positioned ABOVE the Login/Switch User button +4. User status card (always visible, ABOVE the login/logout buttons): + - Card with two rows separated by a divider + - Row 1: "Status" label on the left, value on the right + - Row 2: "External ID" label on the left, value on the right + - When logged out: + - Status shows "Anonymous" + - External ID shows "–" (dash) + - When logged in: + - Status shows "Logged In" with green styling (Color(0xFF2E7D32)) + - External ID shows the actual external user ID 5. LOGIN USER button: - Shows "LOGIN USER" when no user is logged in - Shows "SWITCH USER" when a user is logged in - Opens dialog with empty "External User Id" field -6. LOGOUT USER button +6. LOGOUT USER button (only visible when a user is logged in) ``` ### Prompt 2.2 - Push Section From 51cb822028c90316a77e0dd8a08788591965543e Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 17 Feb 2026 13:15:07 -0800 Subject: [PATCH 2/2] center top app bar --- examples/build.md | 2 ++ .../src/main/java/com/onesignal/sdktest/ui/main/MainScreen.kt | 4 ++-- .../com/onesignal/sdktest/ui/secondary/SecondaryActivity.kt | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/build.md b/examples/build.md index c63b4c27c..fb6fae13d 100644 --- a/examples/build.md +++ b/examples/build.md @@ -17,6 +17,8 @@ Build a sample Android app with: - Package name: com.onesignal.sdktest (must match google-services.json and agconnect-services.json) - All dialogs should have EMPTY input fields (for Appium testing - test framework enters values) - Material3 theming with OneSignal brand colors +- App name (in strings.xml): "OneSignal Demo" +- Top app bar: use CenterAlignedTopAppBar (Material3) with the OneSignal logo + "Sample App" text, centered horizontally ``` ### Prompt 1.2 - OneSignal Code Organization diff --git a/examples/demo/app/src/main/java/com/onesignal/sdktest/ui/main/MainScreen.kt b/examples/demo/app/src/main/java/com/onesignal/sdktest/ui/main/MainScreen.kt index 05c2c04bf..a9c02609b 100644 --- a/examples/demo/app/src/main/java/com/onesignal/sdktest/ui/main/MainScreen.kt +++ b/examples/demo/app/src/main/java/com/onesignal/sdktest/ui/main/MainScreen.kt @@ -19,7 +19,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.Text -import androidx.compose.material3.TopAppBar +import androidx.compose.material3.CenterAlignedTopAppBar import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -103,7 +103,7 @@ fun MainScreen(viewModel: MainViewModel) { Box(modifier = Modifier.fillMaxSize()) { Scaffold( topBar = { - TopAppBar( + CenterAlignedTopAppBar( title = { Row(verticalAlignment = Alignment.CenterVertically) { Image( diff --git a/examples/demo/app/src/main/java/com/onesignal/sdktest/ui/secondary/SecondaryActivity.kt b/examples/demo/app/src/main/java/com/onesignal/sdktest/ui/secondary/SecondaryActivity.kt index 130d503ef..6c3ef7f6c 100644 --- a/examples/demo/app/src/main/java/com/onesignal/sdktest/ui/secondary/SecondaryActivity.kt +++ b/examples/demo/app/src/main/java/com/onesignal/sdktest/ui/secondary/SecondaryActivity.kt @@ -14,7 +14,7 @@ import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.Text -import androidx.compose.material3.TopAppBar +import androidx.compose.material3.CenterAlignedTopAppBar import androidx.compose.material3.TopAppBarDefaults import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -33,7 +33,7 @@ class SecondaryActivity : ComponentActivity() { OneSignalTheme { Scaffold( topBar = { - TopAppBar( + CenterAlignedTopAppBar( title = { Text("Secondary Activity", color = Color.White) }, navigationIcon = { IconButton(onClick = { finish() }) {