Skip to content

Instantly share code, notes, and snippets.

Avatar

Denis Ismailaj denis-ismailaj

View GitHub Profile
@denis-ismailaj
denis-ismailaj / OutlinedLabelledRadioButton.kt
Created May 20, 2021
Selectable outlined radio button
View OutlinedLabelledRadioButton.kt
@Composable
fun OutlinedLabelledRadioButton(
selected: Boolean,
onClick: () -> Unit,
label: String,
modifier: Modifier = Modifier
) {
OutlinedButton(
onClick = onClick,
border = BorderStroke(
View LabelledRadioButton.kt
@Composable
fun LabelledRadioButton(
selected: Boolean,
onClick: () -> Unit,
label: String,
modifier: Modifier = Modifier
) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = modifier
@denis-ismailaj
denis-ismailaj / WormPageIndicator.kt
Last active Apr 29, 2021
Animated worm page indicator composable for Jetpack Compose
View WormPageIndicator.kt
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.requiredWidth
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.CornerRadius
@denis-ismailaj
denis-ismailaj / LabelledCheckBox.kt
Last active May 19, 2021
LabelledCheckBox in Jetpack Compose
View LabelledCheckBox.kt
@Composable
fun LabelledCheckBox(
checked: Boolean,
onCheckedChange: ((Boolean) -> Unit),
label: String,
modifier: Modifier = Modifier
) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = modifier