mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-09 12:04:11 +08:00
feat: update demo
This commit is contained in:
@@ -31,6 +31,6 @@ fun main() = application {
|
|||||||
Window(
|
Window(
|
||||||
onCloseRequest = ::exitApplication,
|
onCloseRequest = ::exitApplication,
|
||||||
title = "FlexiUI Demo",
|
title = "FlexiUI Demo",
|
||||||
state = rememberWindowState(width = 550.dp, height = 700.dp)
|
state = rememberWindowState(width = 550.dp, height = 800.dp)
|
||||||
) { MainView() }
|
) { MainView() }
|
||||||
}
|
}
|
@@ -43,6 +43,7 @@ import com.highcapable.flexiui.component.AreaBox
|
|||||||
import com.highcapable.flexiui.component.Button
|
import com.highcapable.flexiui.component.Button
|
||||||
import com.highcapable.flexiui.component.CheckBox
|
import com.highcapable.flexiui.component.CheckBox
|
||||||
import com.highcapable.flexiui.component.RadioButton
|
import com.highcapable.flexiui.component.RadioButton
|
||||||
|
import com.highcapable.flexiui.component.Slider
|
||||||
import com.highcapable.flexiui.component.Surface
|
import com.highcapable.flexiui.component.Surface
|
||||||
import com.highcapable.flexiui.component.Switch
|
import com.highcapable.flexiui.component.Switch
|
||||||
import com.highcapable.flexiui.component.Text
|
import com.highcapable.flexiui.component.Text
|
||||||
@@ -54,6 +55,7 @@ import com.highcapable.flexiui.pinkColors
|
|||||||
import com.highcapable.flexiui.purpleColors
|
import com.highcapable.flexiui.purpleColors
|
||||||
import com.highcapable.flexiui.redColors
|
import com.highcapable.flexiui.redColors
|
||||||
import com.highcapable.flexiui.yellowColors
|
import com.highcapable.flexiui.yellowColors
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun App() {
|
fun App() {
|
||||||
@@ -106,6 +108,11 @@ fun App() {
|
|||||||
Text(text = "Option 2")
|
Text(text = "Option 2")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Spacer(Modifier.padding(15.dp))
|
||||||
|
var value by remember { mutableStateOf(50f) }
|
||||||
|
Text(text = "Current Value: ${value.roundToInt()}", modifier = Modifier.width(150.dp))
|
||||||
|
Spacer(Modifier.padding(10.dp))
|
||||||
|
Slider(value = value, onValueChange = { value = it })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer(Modifier.padding(10.dp))
|
Spacer(Modifier.padding(10.dp))
|
||||||
|
Reference in New Issue
Block a user