Skip to content

Commit

Permalink
implemented settings screen view
Browse files Browse the repository at this point in the history
  • Loading branch information
Vazhapp committed Jan 28, 2023
1 parent 38eb77d commit a8110df
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 a8110df

Please sign in to comment.