Skip to content

Instantly share code, notes, and snippets.

View matheusxreis's full-sized avatar
🎯
Focusing

Matheus Reis matheusxreis

🎯
Focusing
View GitHub Profile
@crisu83
crisu83 / DatePicker.kt
Last active February 12, 2024 10:22
DatePicker and TimePicker components for Jetpack Compose.
@Composable
fun DatePicker(
label: String,
value: String,
onValueChange: (String) -> Unit = {},
keyboardActions: KeyboardActions = KeyboardActions.Default,
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
pattern: String = "yyyy-MM-dd",
) {
val formatter = DateTimeFormatter.ofPattern(pattern)
@manuelvicnt
manuelvicnt / ProvideViewModels.kt
Last active May 2, 2024 17:16
Scope ViewModels to Composables
// PLEASE, READ
//
// This is a way to scope ViewModels to the Composition.
// However, this doesn't survive configuration changes or procress death on its own.
// You can handle all config changes in compose by making the activity handle those in the Manifest file
// e.g. android:configChanges="colorMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode">
//
// This is just an exploration to see what's possible in Compose. We don't encourage developers to copy-paste
// this code if they don't fully understand the implications of it and if this actually solves the use case to solve.
@qoomon
qoomon / conventional_commit_messages.md
Last active June 3, 2024 05:50
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default