Skip to content

Instantly share code, notes, and snippets.

View sergejsha's full-sized avatar
🔭

Sergej Shafarenka sergejsha

🔭
View GitHub Profile
@sergejsha
sergejsha / App.kt
Last active October 11, 2024 04:39
Pure-Compose ViewModel (like Molecule, but without Molecule)
package de.halfbit.seventysix
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.Button
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@sergejsha
sergejsha / EditorString.kt
Created August 4, 2023 20:02
TextField911.kt for avoiding synchronization issues in standard BasicTextField
/**
* Copyright 2023 Sergej Shafarenka, www.halfbit.de
* Licensed under the Apache License, Version 2.0
*/
package de.halfbit.textfield911
data class EditorString(
val value: String,
val modelVersion: Int,
val editorVersion: Int,