diff --git a/app/src/main/java/app/myzel394/alibi/ui/screens/AboutScreen.kt b/app/src/main/java/app/myzel394/alibi/ui/screens/AboutScreen.kt index 5476290..f260943 100644 --- a/app/src/main/java/app/myzel394/alibi/ui/screens/AboutScreen.kt +++ b/app/src/main/java/app/myzel394/alibi/ui/screens/AboutScreen.kt @@ -5,12 +5,16 @@ import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.filled.OpenInNew +import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton @@ -24,9 +28,11 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.navigation.NavController import app.myzel394.alibi.R @@ -64,34 +70,79 @@ fun AboutScreen( Column( modifier = Modifier .fillMaxSize() - .padding(padding), - verticalArrangement = Arrangement.spacedBy(16.dp), + .padding(padding) + .padding(horizontal = 32.dp), + verticalArrangement = Arrangement.spacedBy(48.dp), horizontalAlignment = Alignment.CenterHorizontally, ) { - Box( - modifier = Modifier - .clip(CircleShape) - .size(200.dp) - .background( - MaterialTheme.colorScheme.surfaceVariant - ), + Column( + verticalArrangement = Arrangement.spacedBy(16.dp), + horizontalAlignment = Alignment.CenterHorizontally, ) { - Image( - painter = painterResource(R.drawable.launcher_foreground), - contentDescription = null, + Box( + modifier = Modifier + .clip(CircleShape) + .size(200.dp) + .background( + MaterialTheme.colorScheme.surfaceVariant + ), + ) { + Image( + painter = painterResource(R.drawable.launcher_foreground), + contentDescription = null, + ) + } + Text( + text = stringResource(R.string.app_name), + style = MaterialTheme.typography.headlineLarge, + ) + Text( + text = "Version %s (%s)".format( + BuildConfig.VERSION_NAME, + BuildConfig.VERSION_CODE.toString() + ), + style = MaterialTheme.typography.bodyMedium, ) } - Text( - text = stringResource(R.string.app_name), - style = MaterialTheme.typography.headlineLarge, - ) - Text( - text = "Version %s (%s)".format( - BuildConfig.VERSION_NAME, - BuildConfig.VERSION_CODE.toString() - ), - style = MaterialTheme.typography.bodyMedium, - ) + Column( + verticalArrangement = Arrangement.spacedBy(24.dp), + ) { + Text( + stringResource(R.string.ui_about_contribute_title), + style = MaterialTheme.typography.titleMedium, + ) + Text( + stringResource(R.string.ui_about_contribute_message), + style = MaterialTheme.typography.titleMedium, + ) + Row( + modifier = Modifier + .fillMaxWidth() + .clip(MaterialTheme.shapes.medium) + .background( + MaterialTheme.colorScheme.surfaceVariant + ) + .padding(16.dp), + horizontalArrangement = Arrangement.SpaceEvenly, + verticalAlignment = Alignment.CenterVertically, + ) { + Image( + painter = painterResource(R.drawable.ic_github), + colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurfaceVariant), + contentDescription = null, + modifier = Modifier.size(ButtonDefaults.IconSize.times(1.5f)) + ) + Text( + stringResource(R.string.ui_about_contribute_development), + fontWeight = FontWeight.Bold, + ) + Icon( + Icons.Default.OpenInNew, + contentDescription = null, + modifier = Modifier.size(ButtonDefaults.IconSize) + ) + } + } } } } diff --git a/app/src/main/res/drawable/ic_github.xml b/app/src/main/res/drawable/ic_github.xml new file mode 100644 index 0000000..34241ea --- /dev/null +++ b/app/src/main/res/drawable/ic_github.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 378ea4f..527649d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -89,4 +89,7 @@ Update notification This is a preview for your notification. You can edit the title and the message. At the bottom you can find some presets. About Alibi + Support Alibi + In my free time I develop Alibi and other free open source software. It would mean the world to me if you could help me in any way :) + Developing features or fixing bugs \ No newline at end of file