-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WTA #71: Added basic setup for details page.
- Loading branch information
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
details/src/main/java/com/jacob/wakatimeapp/details/DetailsModule.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,9 @@ | ||
package com.jacob.wakatimeapp.details | ||
|
||
import dagger.Module | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object DetailsModule |
3 changes: 3 additions & 0 deletions
3
details/src/main/java/com/jacob/wakatimeapp/details/ui/DetailsPageNavigator.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,3 @@ | ||
package com.jacob.wakatimeapp.details.ui | ||
|
||
interface DetailsPageNavigator |
38 changes: 38 additions & 0 deletions
38
details/src/main/java/com/jacob/wakatimeapp/details/ui/DetailsPageScreen.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,38 @@ | ||
package com.jacob.wakatimeapp.details.ui | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.hilt.navigation.compose.hiltViewModel | ||
|
||
@Composable | ||
fun DetailsPageScreen( | ||
navigator: DetailsPageNavigator, | ||
modifier: Modifier = Modifier, | ||
) = DetailsPageScreen( | ||
navigator = navigator, | ||
modifier = modifier, | ||
viewModel = hiltViewModel(), | ||
) | ||
|
||
@Composable | ||
private fun DetailsPageScreen( | ||
navigator: DetailsPageNavigator, | ||
viewModel: DetailsPageViewModel, | ||
modifier: Modifier = Modifier, | ||
) { | ||
Column( | ||
modifier = modifier, | ||
horizontalAlignment = Alignment.CenterHorizontally, | ||
verticalArrangement = Arrangement.Center, | ||
) { | ||
Text( | ||
text = "Details Page", | ||
style = MaterialTheme.typography.headlineLarge, | ||
) | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
details/src/main/java/com/jacob/wakatimeapp/details/ui/DetailsPageViewModel.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,8 @@ | ||
package com.jacob.wakatimeapp.details.ui | ||
|
||
import androidx.lifecycle.ViewModel | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class DetailsPageViewModel @Inject constructor() : ViewModel() |