diff --git a/app/build.gradle.kts b/app/build.gradle.kts index bff30cd..12afbcc 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -13,7 +13,7 @@ android { minSdk = 24 targetSdk = 35 versionCode = 1 - versionName = "1.0" + versionName = "1.1" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { diff --git a/app/release/app-release.apk b/app/release/app-release.apk index f83d548..7fdede9 100644 Binary files a/app/release/app-release.apk and b/app/release/app-release.apk differ diff --git a/app/release/baselineProfiles/0/app-release.dm b/app/release/baselineProfiles/0/app-release.dm index 3d4e155..0f1d1c1 100644 Binary files a/app/release/baselineProfiles/0/app-release.dm and b/app/release/baselineProfiles/0/app-release.dm differ diff --git a/app/release/baselineProfiles/1/app-release.dm b/app/release/baselineProfiles/1/app-release.dm index 54bed8c..a82c846 100644 Binary files a/app/release/baselineProfiles/1/app-release.dm and b/app/release/baselineProfiles/1/app-release.dm differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 7cc2871..cbec0a0 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -12,7 +12,7 @@ "filters": [], "attributes": [], "versionCode": 1, - "versionName": "1.0", + "versionName": "1.1", "outputFile": "app-release.apk" } ], diff --git a/app/src/main/java/at/crowdware/paperproto/MainActivity.kt b/app/src/main/java/at/crowdware/paperproto/MainActivity.kt index 1158f1d..00b9162 100644 --- a/app/src/main/java/at/crowdware/paperproto/MainActivity.kt +++ b/app/src/main/java/at/crowdware/paperproto/MainActivity.kt @@ -120,8 +120,8 @@ class MainActivity : ComponentActivity() { ) { when (screenState) { ScreenState.PreviewMode -> { - val currentPage = pages.find { it.id == currentPageId } - currentPage?.let { page -> + val page = pages.find { it.id == currentPageId } + if (page != null) { PreviewModeScreen( onOpenDrawer = { scope.launch { drawerState.open() } @@ -143,6 +143,27 @@ class MainActivity : ComponentActivity() { } } ) + } else { + Column (modifier = Modifier.fillMaxSize().padding(16.dp), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally){ + Text(text = "Welcome to PaperProto", style = MaterialTheme.typography.titleLarge, fontWeight = FontWeight.Bold) + Spacer(Modifier.height(8.dp)) + Text( + text = "The idea behind this app is to take pictures from your paper prototypes and use them as an interactive mockup.\nIf you mark a hotspot you are able to simulate a button when in preview mode. Clicking a button opens another picture.\n\nSo first step will be to take a picture.\nTo take a picture open the drawer by swiping from the left to the right and click on 'Take Picture'.", + style = MaterialTheme.typography.bodyLarge + ) + Spacer(Modifier.height(8.dp)) + Text( + text = "To add a hotspot also open the drawer by swiping from the left to the right and click on 'Add Hotspot'.\nThen you can drag the hotspot to the desired location and resize it and click on the plus button to select a page to link to.", + style = MaterialTheme.typography.bodyLarge + ) + Spacer(Modifier.height(8.dp)) + Text( + text = "After linking the hotspots to the pages you can switch to preview mode by clicking on the 'Switch to Preview' button.\nThe rest should be self explanatory.\nEnjoy our app.", + style = MaterialTheme.typography.bodyLarge + ) + } } } @@ -257,6 +278,7 @@ class MainActivity : ComponentActivity() { Modifier .fillMaxSize() ) { + println("PreviewModeScreen: $page") if (page != null) { ImageWithMultipleHotspots( page = page, @@ -265,17 +287,6 @@ class MainActivity : ComponentActivity() { onHotspotsChanged = onHotspotsChanged, onHotspotClicked = onHotspotClicked ) - } else { - Column (modifier = Modifier.fillMaxSize().padding(16.dp), - verticalArrangement = Arrangement.Center, - horizontalAlignment = Alignment.CenterHorizontally){ - Text(text = "Welcome to PaperProto", style = MaterialTheme.typography.titleLarge, fontWeight = FontWeight.Bold) - Spacer(Modifier.height(8.dp)) - Text( - text = "The idea behind this app is to take pictures from your paper prototypes and use them as an interactive mockup.\nIf you mark a hotspot you are able to simulate a button when in preview mode. Clicking a button opens another picture.\n\nSo first step will be to take a picture.\nTo take a picture open the drawer by swiping from the left to the right and click on 'Take Picture'.", - style = MaterialTheme.typography.bodyLarge - ) - } } } }