Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

Commit

Permalink
Adding few things
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxSpins committed Nov 12, 2024
1 parent f59dcf0 commit e70ce37
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .androidide/editor/openedFiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"file": "/storage/emulated/0/sakura/app/src/main/java/com/syntaxspin/sakura/MainActivity.kt",
"selection": {
"end": {
"column": 30,
"index": 6973,
"line": 224
"column": 37,
"index": 7588,
"line": 245
},
"start": {
"column": 30,
"index": 6973,
"line": 224
"column": 37,
"index": 7588,
"line": 245
}
}
}
Expand Down
Binary file modified .gradle/8.9/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/8.9/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/8.9/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/8.9/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/8.9/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
18 changes: 18 additions & 0 deletions app/src/main/java/com/syntaxspin/sakura/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ import androidx.compose.foundation.clickable

//Local Context
import androidx.compose.ui.platform.LocalContext
//Logics
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember

//Units & Draws
import androidx.compose.ui.draw.clip
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -60,6 +66,8 @@ class MainActivity : ComponentActivity() {
mtrlButton("Click Me")
dividerText("TextField")
textfield()
dividerText("Material Switch")
Switchify()
}
}
}
Expand Down Expand Up @@ -227,6 +235,16 @@ fun textfield(){
.padding(8.dp)
)
}
@Composable
fun Switchify (){
var checked by remember { mutableStateOf(true) }
Switch( //text ="Switch ON/OFF",
checked = checked ,
onCheckedChange = {
checked = it
},
modifier = Modifier.padding(16.dp))
}
}


0 comments on commit e70ce37

Please sign in to comment.