Skip to content

Commit

Permalink
Merge pull request #59 from shalva97/implement/settings-view
Browse files Browse the repository at this point in the history
implemented settings screen view
  • Loading branch information
shalva97 authored Jan 28, 2023
2 parents a68cf3c + a8110df commit ee6fd9b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
kotlin.code.style=official
kotlin.daemon.jvmargs=-Xmx8048
kotlin.code.style=official
33 changes: 31 additions & 2 deletions web2/src/main/kotlin/me/shalva97/screens/settings.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
package me.shalva97.screens

import androidx.compose.foundation.layout.*
import androidx.compose.material.OutlinedTextField
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

@Composable
fun SettingsPage() {
Text("Settings page")
var maxNumberOfChar = 3
var value by remember {
mutableStateOf("10")
}

Column (
modifier = Modifier.fillMaxSize().padding(16.dp),
) {
Row (
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = "Minimum video clicks:"
)
OutlinedTextField(
modifier = Modifier.height(50.dp).width(150.dp),
value = value,
singleLine = true,
onValueChange = { newText ->
if (newText.length <= maxNumberOfChar)
value = newText.filter { it.isDigit() }
}
)
}
}
}

0 comments on commit ee6fd9b

Please sign in to comment.