feat: Add semantic enrichment to all Kotlin files
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
// [PACKAGE] com.homebox.lens
|
||||
// [FILE] MainActivity.kt
|
||||
|
||||
// [SEMANTICS] ui, activity, entrypoint
|
||||
package com.homebox.lens
|
||||
|
||||
// [IMPORTS]
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
@@ -16,20 +17,23 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.homebox.lens.navigation.NavGraph
|
||||
import com.homebox.lens.ui.theme.HomeboxLensTheme
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import timber.log.Timber
|
||||
// [END_IMPORTS]
|
||||
|
||||
// [CONTRACT]
|
||||
// [ENTITY: Activity('MainActivity')]
|
||||
/**
|
||||
* [ENTITY: Activity('MainActivity')]
|
||||
* [PURPOSE] Главная и единственная Activity в приложении.
|
||||
* @summary Главная и единственная Activity в приложении.
|
||||
*/
|
||||
@AndroidEntryPoint
|
||||
class MainActivity : ComponentActivity() {
|
||||
// [LIFECYCLE]
|
||||
// [ENTITY: Function('onCreate')]
|
||||
// [RELATION: Function('onCreate')] -> [CALLS] -> [Function('HomeboxLensTheme')]
|
||||
// [RELATION: Function('onCreate')] -> [CALLS] -> [Function('NavGraph')]
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
Timber.d("[DEBUG][LIFECYCLE][creating_activity] MainActivity created.")
|
||||
setContent {
|
||||
HomeboxLensTheme {
|
||||
// A surface container using the 'background' color from the theme
|
||||
Surface(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
color = MaterialTheme.colorScheme.background
|
||||
@@ -39,9 +43,11 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// [END_ENTITY: Function('onCreate')]
|
||||
}
|
||||
// [END_ENTITY: Activity('MainActivity')]
|
||||
|
||||
// [HELPER]
|
||||
// [ENTITY: Function('Greeting')]
|
||||
@Composable
|
||||
fun Greeting(name: String, modifier: Modifier = Modifier) {
|
||||
Text(
|
||||
@@ -49,8 +55,9 @@ fun Greeting(name: String, modifier: Modifier = Modifier) {
|
||||
modifier = modifier
|
||||
)
|
||||
}
|
||||
// [END_ENTITY: Function('Greeting')]
|
||||
|
||||
// [PREVIEW]
|
||||
// [ENTITY: Function('GreetingPreview')]
|
||||
@Preview(showBackground = true)
|
||||
@Composable
|
||||
fun GreetingPreview() {
|
||||
@@ -58,5 +65,6 @@ fun GreetingPreview() {
|
||||
Greeting("Android")
|
||||
}
|
||||
}
|
||||
// [END_ENTITY: Function('GreetingPreview')]
|
||||
|
||||
// [END_FILE_MainActivity.kt]
|
||||
// [END_FILE_MainActivity.kt]
|
||||
Reference in New Issue
Block a user