remote license page

This commit is contained in:
Martin Ptáček
2023-07-29 21:18:41 +02:00
parent dffb10d748
commit 160134b1d2
2 changed files with 4 additions and 44 deletions

View File

@ -59,7 +59,6 @@ class MainActivity : ComponentActivity() {
promViewModel = promViewModel promViewModel = promViewModel
) )
} }
composable("license") { LicensePage(navController = navController) }
} }
} }
} }

View File

@ -4,10 +4,7 @@ package com.birdthedeveloper.prometheus.android.exporter.compose
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.material.Button
import androidx.compose.material.ButtonDefaults
import androidx.compose.material.Icon import androidx.compose.material.Icon
import androidx.compose.material.IconButton import androidx.compose.material.IconButton
import androidx.compose.material.Text import androidx.compose.material.Text
@ -16,7 +13,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack import androidx.compose.material.icons.filled.ArrowBack
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.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController import androidx.navigation.NavHostController
@ -41,44 +38,8 @@ fun SettingsPage(
} }
) )
Column( Text( modifier = Modifier.padding(all = 20.dp),
modifier = Modifier.fillMaxSize() text = "This application is licensed under the Apache 2.0 license.", textAlign = TextAlign.Center,)
) { Text(modifier = Modifier.padding(all = 20.dp),text = "Author: Martin Ptacek, 2023", textAlign = TextAlign.Center,)
Button(
onClick = { navController.navigate("license") },
modifier = Modifier.fillMaxWidth(),
colors = ButtonDefaults.buttonColors(backgroundColor = Color.Gray)
) {
Text(text = "License")
}
}
}
}
@Composable
fun LicensePage(
navController: NavHostController,
) {
Column(
Modifier.fillMaxSize()
) {
TopAppBar(
title = {
Text(text = "License")
},
navigationIcon = {
IconButton(onClick = { navController.navigateUp() }) {
Icon(
imageVector = Icons.Filled.ArrowBack,
contentDescription = "Back",
)
}
}
)
Text(
//TODO license
modifier = Modifier.padding(all = 8.dp),
text = "License todo"
)
} }
} }