Skip to content

Commit be24ab0

Browse files
committed
Learned slider component
1 parent e70ce37 commit be24ab0

8 files changed

Lines changed: 11 additions & 22 deletions

File tree

.androidide/editor/openedFiles.json

Lines changed: 0 additions & 20 deletions
This file was deleted.
481 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
34 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

app/src/main/java/com/syntaxspin/sakura/MainActivity.kt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class MainActivity : ComponentActivity() {
6868
textfield()
6969
dividerText("Material Switch")
7070
Switchify()
71+
dividerText("Slider")
72+
sliderSyntax()
7173
}
7274
}
7375
}
@@ -104,7 +106,7 @@ fun Items(){
104106

105107
Spacer(modifier = Modifier .width(8.dp) .padding(top = 8.dp))
106108
Column{
107-
Name("ScriptWrap")
109+
Name("SyntaxSpin")
108110
Desc("Learning Compose from the Master Of Compose Aquiles Trindade")
109111

110112
}
@@ -244,7 +246,14 @@ Switch( //text ="Switch ON/OFF",
244246
checked = it
245247
},
246248
modifier = Modifier.padding(16.dp))
247-
}
249+
}
250+
@Composable
251+
fun sliderSyntax(){
252+
Slider(
253+
value = sliderPosition,
254+
onValueChange = { sliderPosition = it }
255+
)
256+
}
248257
}
249258

250259

0 commit comments

Comments
 (0)