This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { | |
margin: 0; | |
height: 100%; | |
} | |
#c { | |
width: 100%; | |
height: 100%; | |
display: block; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun SelectableItem( | |
modifier: Modifier = Modifier, | |
text: String, | |
selected: Boolean = false, | |
onClick: (() -> Unit)? = null, | |
) { | |
Button( | |
onClick = { onClick?.invoke() }, | |
modifier = modifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Serializable | |
data class User( | |
val name: String, | |
val email: String, | |
val age: Int = 13, | |
val isAlive: Boolean = false, | |
val role: Role = Role.Viewer, | |
val bodyType: BodyType = BodyType(Body.NotSkinny), | |
) | |
@Serializable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.ui.unit.dp | |
import androidx.compose.ui.unit.sp | |
class Dimens { | |
companion object { | |
val buttonHeight = 16.dp | |
} | |
} | |
class Padding { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml | |
class FontFamily { | |
companion object { | |
val robotoFamily = FontFamily( | |
Font(R.font.roboto_bold, FontWeight.Bold), | |
Font(R.font.roboto_medium, FontWeight.Medium) | |
) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.material.Text | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.graphics.Color | |
import androidx.compose.ui.text.font.FontWeight | |
import androidx.compose.ui.unit.TextUnit | |
import com.your.project.resources.FontFamily | |
@Composable | |
fun Text( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let amPmFormat = "h:mm a" | |
let twentyFourHFormat = "HH:mm" | |
func hourMinuteParser(date: Date) -> KotlinInt{ | |
let formatter = DateFormatter() | |
if DateFormatter.dateFormat(fromTemplate: "j",options:0, locale: Locale.current)!.contains("a") { | |
formatter.dateFormat = amPmFormat | |
}else{ | |
formatter.dateFormat = twentyFourHFormat | |
} | |
let stringTime = formatter.string(from: date) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gradle | |
/local.properties | |
/.idea/workspace.xml | |
.DS_Store | |
/build |