You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apropos #352, since users who want to set up custom fonts for nav bars and tab views need to do so with a MaterialTheme and a Typography, it would be great if skip init generated one out of the box.
In Android Studio, when you create a new project with an empty activity called "Foo", in addition to a MainActivity.kt file that sets up a basic "Hello, world" Text composable, it sets up a slotted FooTheme composable that wraps its content in a MaterialTheme.
It creates a com.example.foo.ui.theme package, containing Theme.kt:
package com.example.foo.ui.theme
import androidx.compose.ui.graphics.Color
val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)
val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)
and Type.kt
// 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
)
/* Other default text styles to override
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 22.sp,
lineHeight = 28.sp,
letterSpacing = 0.sp
),
labelSmall = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 11.sp,
lineHeight = 16.sp,
letterSpacing = 0.5.sp
)
*/
)
It would be great if skip init did something similar, making it easy to see how to configure stuff like this.
The text was updated successfully, but these errors were encountered:
Apropos #352, since users who want to set up custom fonts for nav bars and tab views need to do so with a
MaterialTheme
and aTypography
, it would be great ifskip init
generated one out of the box.In Android Studio, when you create a new project with an empty activity called "Foo", in addition to a
MainActivity.kt
file that sets up a basic "Hello, world"Text
composable, it sets up a slottedFooTheme
composable that wraps its content in aMaterialTheme
.It creates a
com.example.foo.ui.theme
package, containingTheme.kt
:Color.kt
and
Type.kt
It would be great if
skip init
did something similar, making it easy to see how to configure stuff like this.The text was updated successfully, but these errors were encountered: