Skip to content

Commit

Permalink
Merge pull request #13 from CryZo/9-small-screen-improvements
Browse files Browse the repository at this point in the history
#9 - Header refactoring
  • Loading branch information
CryZo authored Apr 7, 2024
2 parents ae3429f + f765850 commit 9f48a90
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 22 deletions.
53 changes: 32 additions & 21 deletions app/src/main/java/com/chaser/paintballnotificator/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ import androidx.compose.material.icons.rounded.Refresh
import androidx.compose.material.icons.rounded.Share
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LargeTopAppBar
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.MediumTopAppBar
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Surface
Expand Down Expand Up @@ -400,6 +403,7 @@ class MainActivity : ComponentActivity() {
) {
Text(
text = stringResource(R.string.match_id, gameId.value),
maxLines = 1,
color = MaterialTheme.colorScheme.onPrimary
)
IconButton(onClick = { setRandomGameId() }) {
Expand Down Expand Up @@ -542,31 +546,38 @@ class MainActivity : ComponentActivity() {
) {
Scaffold(
topBar = {
TopAppBar(
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.primary,
titleContentColor = MaterialTheme.colorScheme.onPrimary,
),
title = {
TeamSelector()
},
actions = {
if (connecting.value) {
CircularProgressIndicator(
// modifier = Modifier.width(64.dp),
color = MaterialTheme.colorScheme.onPrimary,
trackColor = MaterialTheme.colorScheme.primary,
)
}
else {
Row (verticalAlignment = Alignment.CenterVertically) {
if (gameId.value != "") {
MediumTopAppBar(
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.primary,
titleContentColor = MaterialTheme.colorScheme.onPrimary,
),
title = {
Row (modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) {
TeamSelector()
}
},
navigationIcon = {
if (!connecting.value) {
GameSelector()
}
},
actions = {
if (connecting.value) {
if (gameId.value != "") {
CircularProgressIndicator(
color = MaterialTheme.colorScheme.onPrimary,
trackColor = MaterialTheme.colorScheme.primary,
)
}
}
else {
ShareButton()
}
}
}
)
},
)
}
}
) { innerPadding ->
if (gameId.value != "") {
LazyColumn(
Expand Down
2 changes: 1 addition & 1 deletion app/version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=1.1.4
VERSION=1.2.0
2 changes: 2 additions & 0 deletions fastlane/metadata/android/de-DE/changelogs/10200.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
v1.2.0:
- Header refactored
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/10200.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
v1.2.0:
- Header refactored

0 comments on commit 9f48a90

Please sign in to comment.