Skip to content

Commit

Permalink
bugfix startscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
Artanidos committed Dec 5, 2024
1 parent 0913872 commit b899b85
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ android {
minSdk = 24
targetSdk = 35
versionCode = 1
versionName = "1.0"
versionName = "1.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
Binary file modified app/release/baselineProfiles/0/app-release.dm
Binary file not shown.
Binary file modified app/release/baselineProfiles/1/app-release.dm
Binary file not shown.
2 changes: 1 addition & 1 deletion app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"versionName": "1.1",
"outputFile": "app-release.apk"
}
],
Expand Down
37 changes: 24 additions & 13 deletions app/src/main/java/at/crowdware/paperproto/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
Expand All @@ -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
)
}
}
}

Expand Down Expand Up @@ -257,6 +278,7 @@ class MainActivity : ComponentActivity() {
Modifier
.fillMaxSize()
) {
println("PreviewModeScreen: $page")
if (page != null) {
ImageWithMultipleHotspots(
page = page,
Expand All @@ -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
)
}
}
}
}
Expand Down

0 comments on commit b899b85

Please sign in to comment.