Skip to content

Commit

Permalink
Apply Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
riggaroo authored and github-actions[bot] committed Nov 21, 2023
1 parent 45c2343 commit ff90068
Showing 1 changed file with 32 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
package com.example.compose.snippets.designsystems
/*
* Copyright 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.compose.snippets.designsystems

import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
Expand Down Expand Up @@ -64,10 +79,8 @@ private object Material3Snippets {
}

// [END android_compose_material3_experimental_annotation]

}


@Composable
private fun Material3ThemeStart() {
// [START android_compose_material3_theme_definition]
Expand Down Expand Up @@ -96,7 +109,6 @@ private object ColorScheme {
// ..
// [END android_compose_material3_theme_colors]


// [START android_compose_material3_theme_color_setup]
private val LightColorScheme = lightColorScheme(
primary = md_theme_light_primary,
Expand Down Expand Up @@ -164,15 +176,16 @@ private object ColorScheme {
containerColor =
if (isSelected) MaterialTheme.colorScheme.primaryContainer
else
MaterialTheme.colorScheme.surfaceVariant)
MaterialTheme.colorScheme.surfaceVariant
)
) {
Text(
text = "Dinner club",
style = MaterialTheme.typography.bodyLarge,
color =
if (isSelected) MaterialTheme.colorScheme.onPrimaryContainer
else MaterialTheme.colorScheme.onSurface,
)
if (isSelected) MaterialTheme.colorScheme.onPrimaryContainer
else MaterialTheme.colorScheme.onSurface,
)
}

// [END android_compose_material3_use_color_theme_2]
Expand All @@ -196,7 +209,7 @@ private object TypographySnippets {
),
// ..
)
//..
// ..
// [END android_compose_material3_typography_definition]

val replyTypography2 = Typography(
Expand Down Expand Up @@ -265,11 +278,12 @@ private object Material3ShapesSetup {
private fun ShapeUsage() {
// [START android_compose_material3_shape_usage]
Card(shape = MaterialTheme.shapes.medium) { /* card content */ }
FloatingActionButton(shape = MaterialTheme.shapes.large,
FloatingActionButton(
shape = MaterialTheme.shapes.large,
onClick = {

}) {
/* fab content */
}
) {
/* fab content */
}
// [END android_compose_material3_shape_usage]
}
Expand Down Expand Up @@ -366,8 +380,8 @@ private object MaterialComponentsExamples {
Destinations.entries.forEach { replyDestination ->
NavigationBarItem(
selected = selectedDestination == replyDestination,
onClick = { },
icon = { }
onClick = { },
icon = { }
)
}
}
Expand Down Expand Up @@ -398,17 +412,16 @@ private object MaterialComponentsExamples {
mutableStateOf(Destinations.Home)
}
// [START android_compose_material3_permanent_nav_drawer]
PermanentNavigationDrawer(modifier = Modifier.fillMaxHeight(), drawerContent = {
PermanentNavigationDrawer(modifier = Modifier.fillMaxHeight(), drawerContent = {
Destinations.entries.forEach { replyDestination ->
NavigationRailItem(
selected = selectedDestination == replyDestination,
onClick = { },
icon = { },
label = { }
label = { }
)
}
}) {

}
// [END android_compose_material3_permanent_nav_drawer]
}
Expand Down Expand Up @@ -449,7 +462,6 @@ private object MaterialAccessibilityExamples {
contentColor = MaterialTheme.colorScheme.onPrimary
)
) {

}

// ❌ Button with poor contrast ratio
Expand All @@ -460,8 +472,7 @@ private object MaterialAccessibilityExamples {
contentColor = MaterialTheme.colorScheme.primaryContainer
)
) {

}
// [END android_compose_material3_button_contrast_example]
}
}
}

0 comments on commit ff90068

Please sign in to comment.