firstTrackOut
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
package com.zacksolutions.clockout
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.zacksolutions.clockout.ui.theme.TrackoutTheme
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
setContent {
|
||||
TrackoutTheme {
|
||||
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
|
||||
Greeting(
|
||||
name = "Sara",
|
||||
modifier = Modifier.padding(innerPadding)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun Greeting(name: String, modifier: Modifier = Modifier) {
|
||||
Text(
|
||||
text = "ElSalaam Alaikoum $name!",
|
||||
modifier = modifier
|
||||
)
|
||||
}
|
||||
@Composable
|
||||
fun ClockInButton(modifier: Modifier = Modifier) {
|
||||
Button(
|
||||
onClick = {
|
||||
// Handle Clock In action here
|
||||
},
|
||||
modifier = modifier
|
||||
) {
|
||||
Text(text = "Clock In")
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ClockOutButton(modifier: Modifier = Modifier) {
|
||||
Button(
|
||||
onClick = {
|
||||
// Handle Clock Out action here
|
||||
},
|
||||
modifier = modifier
|
||||
) {
|
||||
Text(text = "Clock Out")
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(showBackground = true)
|
||||
@Composable
|
||||
fun GreetingPreview() {
|
||||
TrackoutTheme {
|
||||
Greeting("Android")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user