-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
446 additions
and
97 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
wearApp/src/main/java/fr/paug/androidmakers/wear/di/ViewModelModule.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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
package fr.paug.androidmakers.wear.di | ||
|
||
import fr.paug.androidmakers.wear.ui.main.MainViewModel | ||
import fr.paug.androidmakers.wear.ui.session.details.SessionDetailViewModel | ||
import fr.paug.androidmakers.wear.ui.settings.SettingsViewModel | ||
import org.koin.androidx.viewmodel.dsl.viewModel | ||
import org.koin.dsl.module | ||
|
||
val androidViewModelModule = module { | ||
viewModel { MainViewModel(get(), get(), get(), get(), get(), get()) } | ||
viewModel { SettingsViewModel(get(), get()) } | ||
viewModel { SessionDetailViewModel(get(), get(), get(), get(), get(), get()) } | ||
} |
19 changes: 19 additions & 0 deletions
19
wearApp/src/main/java/fr/paug/androidmakers/wear/ui/common/Loading.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,19 @@ | ||
package fr.paug.androidmakers.wear.ui.common | ||
|
||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.wear.compose.material.CircularProgressIndicator | ||
|
||
@Composable | ||
fun Loading() { | ||
Box( | ||
modifier = Modifier | ||
.fillMaxSize(), | ||
contentAlignment = Alignment.Center | ||
) { | ||
CircularProgressIndicator() | ||
} | ||
} |
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
11 changes: 9 additions & 2 deletions
11
wearApp/src/main/java/fr/paug/androidmakers/wear/ui/main/Navigation.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 |
---|---|---|
@@ -1,6 +1,13 @@ | ||
package fr.paug.androidmakers.wear.ui.main | ||
|
||
object Navigation { | ||
const val MAIN = "MAIN" | ||
const val SIGN_IN = "SIGN_IN" | ||
const val main = "main" | ||
|
||
const val signIn = "signIn" | ||
|
||
const val id = "id" | ||
const val sessionDetail = "sessionDetail/{$id}" | ||
fun sessionDetail(id: String): String { | ||
return "sessionDetail/$id" | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
wearApp/src/main/java/fr/paug/androidmakers/wear/ui/session/PreviewData.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,67 @@ | ||
package fr.paug.androidmakers.wear.ui.session | ||
|
||
import fr.androidmakers.domain.model.Room | ||
import fr.androidmakers.domain.model.Session | ||
import fr.androidmakers.domain.model.Speaker | ||
import kotlinx.datetime.LocalDateTime | ||
import kotlinx.datetime.Month | ||
|
||
val uiSession1 = UISession( | ||
session = Session( | ||
id = "1", | ||
title = "Android Graphics: the Path to [UI] Riches", | ||
description = "Android's graphics APIs are extensive and powerful... but maybe a little complicated. This session will show ways to use the graphics APIs to achieve cool effects and improve the visual quality and richness of your applications.", | ||
roomId = "", | ||
speakers = emptyList(), | ||
startsAt = LocalDateTime(2023, Month.APRIL, 27, 9, 15), | ||
endsAt = LocalDateTime(2023, Month.APRIL, 27, 10, 0), | ||
isServiceSession = false, | ||
), | ||
speakers = listOf( | ||
Speaker( | ||
id = "1", | ||
name = "Speaker 1", | ||
bio = "Bio 1", | ||
), | ||
Speaker( | ||
id = "2", | ||
name = "Speaker 2", | ||
bio = "Bio 2", | ||
) | ||
), | ||
room = Room( | ||
id = "1", | ||
name = "Room 1" | ||
), | ||
isBookmarked = true, | ||
) | ||
|
||
val uiSession2 = UISession( | ||
session = Session( | ||
id = "2", | ||
title = "Using Compose Runtime to create a client library", | ||
description = "Jetpack Compose (UI) is a powerful UI toolkit for Android. Have you ever wondered where this power comes from? The answer is Compose Runtime. \r\n\r\nIn this talk, we will see how we can use Compose Runtime to create client libraries. Firstly, we will talk about Compose nodes, Composition, Recomposer, and how they are orchestrated to create a slot table. Then, we will see how the changes in the slot table are applied with an Applier. Moreover, we will touch upon the Snapshot system and how the changes in the state objects trigger a recomposition. Finally, we will create a basic UI toolkit for PowerPoint using Compose Runtime.", | ||
roomId = "", | ||
speakers = emptyList(), | ||
startsAt = LocalDateTime(2023, Month.APRIL, 27, 10, 15), | ||
endsAt = LocalDateTime(2023, Month.APRIL, 27, 11, 0), | ||
isServiceSession = false, | ||
), | ||
speakers = listOf( | ||
Speaker( | ||
id = "3", | ||
name = "Speaker 3", | ||
bio = "Bio 3", | ||
), | ||
), | ||
room = Room( | ||
id = "2", | ||
name = "Room 2" | ||
), | ||
isBookmarked = false, | ||
) | ||
|
||
val uiSessions = listOf( | ||
uiSession1, | ||
uiSession2, | ||
) |
2 changes: 1 addition & 1 deletion
2
...g/androidmakers/wear/ui/main/UISession.kt → ...ndroidmakers/wear/ui/session/UISession.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
Oops, something went wrong.