Skip to content

Commit

Permalink
indent fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ndiritumichael committed Sep 17, 2024
1 parent b788de8 commit 45ce249
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 75 deletions.
42 changes: 21 additions & 21 deletions app/src/main/java/com/devmike/gitissuesmobile/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,37 @@ import androidx.compose.ui.tooling.preview.Preview
import com.devmike.gitissuesmobile.ui.theme.GitIssuesMobileTheme

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
GitIssuesMobileTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
Greeting(
name = "Android",
modifier = Modifier.padding(innerPadding),
)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
GitIssuesMobileTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
Greeting(
name = "Android",
modifier = Modifier.padding(innerPadding),
)
}
}
}
}
}
}
}

@Composable
fun Greeting(
name: String,
modifier: Modifier = Modifier,
name: String,
modifier: Modifier = Modifier,
) {
Text(
text = "Hello $name!",
modifier = modifier,
)
Text(
text = "Hello $name!",
modifier = modifier,
)
}

@Preview(showBackground = true)
@Composable
fun GreetingPreview() {
GitIssuesMobileTheme {
Greeting("Android")
}
GitIssuesMobileTheme {
Greeting("Android")
}
}
56 changes: 28 additions & 28 deletions app/src/main/java/com/devmike/gitissuesmobile/ui/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext

private val DarkColorScheme =
darkColorScheme(
primary = Purple80,
secondary = PurpleGrey80,
tertiary = Pink80,
)
darkColorScheme(
primary = Purple80,
secondary = PurpleGrey80,
tertiary = Pink80,
)

private val LightColorScheme =
lightColorScheme(
primary = Purple40,
secondary = PurpleGrey40,
tertiary = Pink40,
lightColorScheme(
primary = Purple40,
secondary = PurpleGrey40,
tertiary = Pink40,
/* Other default colors to override
background = Color(0xFFFFFBFE),
surface = Color(0xFFFFFBFE),
Expand All @@ -31,29 +31,29 @@ private val LightColorScheme =
onBackground = Color(0xFF1C1B1F),
onSurface = Color(0xFF1C1B1F),
*/
)
)

@Composable
fun GitIssuesMobileTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
// Dynamic color is available on Android 12+
dynamicColor: Boolean = true,
content: @Composable () -> Unit,
darkTheme: Boolean = isSystemInDarkTheme(),
// Dynamic color is available on Android 12+
dynamicColor: Boolean = true,
content: @Composable () -> Unit,
) {
val colorScheme =
when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
}
val colorScheme =
when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
}

darkTheme -> DarkColorScheme
else -> LightColorScheme
}
darkTheme -> DarkColorScheme
else -> LightColorScheme
}

MaterialTheme(
colorScheme = colorScheme,
typography = Typography,
content = content,
)
MaterialTheme(
colorScheme = colorScheme,
typography = Typography,
content = content,
)
}
20 changes: 10 additions & 10 deletions app/src/main/java/com/devmike/gitissuesmobile/ui/theme/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import androidx.compose.ui.unit.sp

// Set of Material typography styles to start with
val Typography =
Typography(
bodyLarge =
TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
lineHeight = 24.sp,
letterSpacing = 0.5.sp,
),
Typography(
bodyLarge =
TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
lineHeight = 24.sp,
letterSpacing = 0.5.sp,
),
/* Other default text styles to override
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
Expand All @@ -33,4 +33,4 @@ val Typography =
letterSpacing = 0.5.sp
)
*/
)
)
35 changes: 19 additions & 16 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
pluginManagement {
includeBuild("build-logic")
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
includeBuild("build-logic")
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

rootProject.name = "GitIssuesMobile"
Expand All @@ -30,3 +30,6 @@ include(":core:datastore")
include(":feature:login")
include(":feature:repository")
include(":feature:issues")
plugins {
id("org.jetbrains.kotlinx.kover.aggregation") version "0.8.3" apply true
}

0 comments on commit 45ce249

Please sign in to comment.