-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from DroidKaigi/takahirom/transition-to-timet…
…able-grid/2023-07-01 Add transition to TimetableGrid
- Loading branch information
Showing
6 changed files
with
110 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...s/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/TimetableTopArea.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package io.github.droidkaigi.confsched2023.sessions.component | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.filled.DateRange | ||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.IconButton | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TopAppBar | ||
import androidx.compose.material3.TopAppBarDefaults | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.layout.onGloballyPositioned | ||
import androidx.compose.ui.platform.testTag | ||
import androidx.compose.ui.unit.dp | ||
import io.github.droidkaigi.confsched2023.sessions.strings.SessionsStrings.Timetable | ||
|
||
const val TimetableUiTypeChangeButtonTestTag = "TimetableUiTypeChangeButton" | ||
|
||
@Composable | ||
@OptIn(ExperimentalMaterial3Api::class) | ||
fun TimetableTopArea(state: TimetableScreenScrollState, onTimetableUiChangeClick: () -> Unit) { | ||
Column { | ||
// TODO: Implement TopAppBar design | ||
TopAppBar( | ||
title = { | ||
Text(text = "KaigiApp") | ||
}, | ||
actions = { | ||
IconButton( | ||
modifier = Modifier.testTag(TimetableUiTypeChangeButtonTestTag), | ||
onClick = { onTimetableUiChangeClick() }, | ||
) { | ||
Icon( | ||
imageVector = Icons.Default.DateRange, | ||
contentDescription = Timetable.asString(), | ||
) | ||
} | ||
}, | ||
colors = TopAppBarDefaults.largeTopAppBarColors( | ||
containerColor = MaterialTheme.colorScheme.surfaceVariant, | ||
), | ||
) | ||
Row( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.onGloballyPositioned { coordinates -> | ||
state.onHeaderPositioned(coordinates.size.height.toFloat()) | ||
}, | ||
) { | ||
// TODO: Implement header desing(title and image etc..) | ||
Spacer(modifier = Modifier.height(130.dp)) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters