preparations

This commit is contained in:
Данила Мочалов 2023-10-06 03:31:54 +04:00
parent 964efd18a4
commit 91329cb86d
2 changed files with 9 additions and 14 deletions

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -9,6 +9,7 @@ import androidx.compose.material.Surface
import androidx.compose.material.Text import androidx.compose.material.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import com.example.shawarma.ui.theme.ShawarmaTheme import com.example.shawarma.ui.theme.ShawarmaTheme
@ -19,25 +20,13 @@ class MainActivity : ComponentActivity() {
ShawarmaTheme { ShawarmaTheme {
// A surface container using the 'background' color from the theme // A surface container using the 'background' color from the theme
Surface( Surface(
modifier = Modifier.fillMaxSize(), modifier = Modifier.fillMaxSize()
color = MaterialTheme.colors.background
) { ) {
Greeting("Android")
} }
} }
} }
} }
} }
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
ShawarmaTheme {
Greeting("Android")
}
}