kopia lustrzana https://github.com/rt-bishop/Look4Sat
Switched to using Material3 components
rodzic
0f4956a6de
commit
4f62e9d655
|
@ -85,39 +85,32 @@ dependencies {
|
|||
kapt "com.google.dagger:hilt-compiler:$hilt_version"
|
||||
implementation "org.osmdroid:osmdroid-android:$osmdroid_version"
|
||||
|
||||
implementation "androidx.compose.ui:ui:$compose_version"
|
||||
implementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
implementation "androidx.activity:activity-compose:$activity_compose_version"
|
||||
implementation "androidx.compose.animation:animation:$compose_version"
|
||||
implementation "androidx.compose.compiler:compiler:$compose_compiler_version"
|
||||
implementation "androidx.compose.material3:material3:$material3_version"
|
||||
implementation "androidx.compose.runtime:runtime:$compose_version"
|
||||
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
|
||||
implementation "androidx.compose.compiler:compiler:$compose_compiler_version"
|
||||
implementation "androidx.compose.animation:animation:$compose_version"
|
||||
implementation "androidx.compose.foundation:foundation:$compose_foundation_version"
|
||||
implementation "androidx.navigation:navigation-compose:$navigation_version"
|
||||
implementation "androidx.activity:activity-compose:$activity_compose_version"
|
||||
implementation "androidx.compose.ui:ui:$compose_version"
|
||||
implementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
implementation "androidx.hilt:hilt-navigation-compose:$hilt_compose_version"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version"
|
||||
implementation "androidx.compose.material:material:$compose_material_version"
|
||||
implementation "androidx.compose.material:material-icons-extended:$compose_material_version"
|
||||
implementation "androidx.compose.material3:material3:$material3_version"
|
||||
implementation "androidx.compose.material3:material3-window-size-class:$material3_version"
|
||||
implementation "com.google.android.material:compose-theme-adapter:$material_adapter_version"
|
||||
implementation "androidx.navigation:navigation-compose:$navigation_version"
|
||||
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
|
||||
debugImplementation "androidx.fragment:fragment-testing:$fragment_test_version"
|
||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version"
|
||||
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
testImplementation "org.mockito:mockito-core:$mockito_version"
|
||||
testImplementation "org.robolectric:robolectric:$robolectric_version"
|
||||
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_test_version"
|
||||
|
||||
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
|
||||
androidTestImplementation "androidx.test:core:$androidx_test_version"
|
||||
androidTestImplementation "androidx.test:runner:$androidx_test_version"
|
||||
androidTestImplementation "androidx.test:rules:$androidx_test_version"
|
||||
androidTestImplementation "androidx.test:runner:$androidx_test_version"
|
||||
androidTestImplementation "androidx.test.ext:junit:$androidx_junit_version"
|
||||
androidTestImplementation "androidx.test.ext:truth:$androidx_test_version"
|
||||
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
|
||||
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
|
||||
androidTestImplementation "org.mockito:mockito-android:$mockito_version"
|
||||
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_test_version"
|
||||
androidTestImplementation "org.mockito:mockito-android:$mockito_version"
|
||||
}
|
||||
|
|
|
@ -24,36 +24,31 @@ import android.content.res.Configuration
|
|||
import android.os.Bundle
|
||||
import android.os.SystemClock
|
||||
import android.view.View
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.composed
|
||||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.navigation.fragment.NavHostFragment
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.navigation.ui.NavigationUI
|
||||
import androidx.navigation.ui.NavigationUiSaveStateControl
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.databinding.ActivityMainBinding
|
||||
import com.rtbishop.look4sat.presentation.bottomNav.MainScreenView
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@AndroidEntryPoint
|
||||
class MainActivity : AppCompatActivity() {
|
||||
class MainActivity : ComponentActivity() {
|
||||
|
||||
@OptIn(NavigationUiSaveStateControl::class)
|
||||
@SuppressLint("SourceLockedOrientationActivity")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
installSplashScreen()
|
||||
super.onCreate(savedInstanceState)
|
||||
val binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
val host = supportFragmentManager.findFragmentById(R.id.nav_host) as NavHostFragment
|
||||
NavigationUI.setupWithNavController(binding.navBar, host.navController, false)
|
||||
setContentView(binding.root)
|
||||
// setContent { MainTheme { MainScreenView() } }
|
||||
setContent { MainTheme { MainScreenView() } }
|
||||
}
|
||||
|
||||
override fun attachBaseContext(newBase: Context?) {
|
||||
|
@ -64,6 +59,10 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
fun Modifier.onClick(onClick: () -> Unit): Modifier = composed {
|
||||
clickable(remember { MutableInteractionSource() }, null) { onClick() }
|
||||
}
|
||||
|
||||
fun <T> Fragment.getNavResult(@IdRes id: Int, key: String, onResult: (result: T) -> Unit) {
|
||||
val backStackEntry = findNavController().getBackStackEntry(id)
|
||||
val observer = LifecycleEventObserver { _, event ->
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.rtbishop.look4sat.presentation
|
||||
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Typography
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
|
@ -19,7 +17,7 @@ private val SurfaceGrey = Color(0xFF1C1C1C)
|
|||
private val Background = Color(0xFF121212)
|
||||
private val Transparent = Color(0x00000000)
|
||||
|
||||
private val DarkColorScheme = darkColorScheme(
|
||||
private val DarkColors = lightColorScheme(
|
||||
primary = SurfaceGrey,
|
||||
secondary = Yellow,
|
||||
tertiary = ButtonGrey,
|
||||
|
@ -29,7 +27,8 @@ private val DarkColorScheme = darkColorScheme(
|
|||
onSecondary = TextBlack,
|
||||
onTertiary = TextWhite,
|
||||
onBackground = TextWhite,
|
||||
onSurface = TextWhite
|
||||
onSurface = TextWhite,
|
||||
surfaceTint = SurfaceGrey
|
||||
)
|
||||
|
||||
private val Typography = Typography(
|
||||
|
@ -54,6 +53,10 @@ private val Typography = Typography(
|
|||
)
|
||||
)
|
||||
|
||||
val Shapes = Shapes(
|
||||
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun MainTheme(
|
||||
// darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
|
@ -68,7 +71,7 @@ fun MainTheme(
|
|||
// darkTheme -> DarkColorScheme
|
||||
// else -> LightColorScheme
|
||||
// }
|
||||
val colorScheme = DarkColorScheme
|
||||
val colors = DarkColors
|
||||
// val view = LocalView.current
|
||||
// if (!view.isInEditMode) {
|
||||
// SideEffect {
|
||||
|
@ -76,5 +79,5 @@ fun MainTheme(
|
|||
// ViewCompat.getWindowInsetsController(view)?.isAppearanceLightStatusBars = darkTheme
|
||||
// }
|
||||
// }
|
||||
MaterialTheme(colorScheme = colorScheme, typography = Typography, content = content)
|
||||
MaterialTheme(colorScheme = colors, typography = Typography, content = content, shapes = Shapes)
|
||||
}
|
||||
|
|
|
@ -1,165 +0,0 @@
|
|||
package com.rtbishop.look4sat.presentation.aboutScreen
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.ComposeView
|
||||
import androidx.compose.ui.platform.ViewCompositionStrategy
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.rtbishop.look4sat.BuildConfig
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.presentation.theme.Look4SatTheme
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@AndroidEntryPoint
|
||||
class AboutFragment : Fragment() {
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||
): View {
|
||||
return ComposeView(requireContext()).apply {
|
||||
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
|
||||
setContent { AboutScreen() }
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(showBackground = true, widthDp = 400, heightDp = 720, showSystemUi = true)
|
||||
@Composable
|
||||
private fun AboutScreen() {
|
||||
Look4SatTheme {
|
||||
LazyColumn(
|
||||
contentPadding = PaddingValues(6.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(6.dp),
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) {
|
||||
item { CardAbout(BuildConfig.VERSION_NAME) }
|
||||
item { CardCredits() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun CardAbout(version: String, modifier: Modifier = Modifier) {
|
||||
Card(modifier = modifier.fillMaxWidth()) {
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Row(horizontalArrangement = Arrangement.Center) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_satellite),
|
||||
tint = MaterialTheme.colors.secondary,
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.size(96.dp)
|
||||
.padding(top = 8.dp, end = 8.dp)
|
||||
)
|
||||
Column {
|
||||
Text(
|
||||
text = stringResource(id = R.string.app_name),
|
||||
fontSize = 48.sp,
|
||||
color = MaterialTheme.colors.secondary
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.app_version, version),
|
||||
fontSize = 21.sp
|
||||
)
|
||||
}
|
||||
}
|
||||
Text(
|
||||
text = stringResource(id = R.string.app_subtitle),
|
||||
fontSize = 21.sp,
|
||||
modifier = modifier.padding(top = 4.dp)
|
||||
)
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceEvenly,
|
||||
modifier = Modifier.padding(start = 4.dp, end = 4.dp)
|
||||
) {
|
||||
LinkButton(
|
||||
onClick = { gotoUrl("https://sites.google.com/view/look4sat-privacy-policy/home") },
|
||||
text = stringResource(id = R.string.btn_privacy),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
LinkButton(
|
||||
onClick = { gotoUrl("https://www.gnu.org/licenses/gpl-3.0.html") },
|
||||
text = stringResource(id = R.string.btn_license),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun CardCredits(modifier: Modifier = Modifier) {
|
||||
Card(modifier = modifier.fillMaxWidth()) {
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.outro_title),
|
||||
fontSize = 18.sp,
|
||||
color = MaterialTheme.colors.secondary,
|
||||
modifier = modifier.padding(8.dp)
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.outro_thanks),
|
||||
fontSize = 16.sp,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = modifier.padding(start = 8.dp, end = 8.dp)
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.outro_license),
|
||||
fontSize = 18.sp,
|
||||
color = MaterialTheme.colors.secondary,
|
||||
modifier = modifier.padding(start = 8.dp, end = 8.dp, top = 8.dp, bottom = 4.dp)
|
||||
)
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceEvenly,
|
||||
modifier = Modifier.padding(start = 4.dp, end = 4.dp)
|
||||
) {
|
||||
LinkButton(
|
||||
onClick = { gotoUrl("https://github.com/rt-bishop/Look4Sat/") },
|
||||
text = stringResource(id = R.string.btn_github),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
LinkButton(
|
||||
onClick = { gotoUrl("https://ko-fi.com/rt_bishop") },
|
||||
text = stringResource(id = R.string.btn_support),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
LinkButton(
|
||||
onClick = { gotoUrl("https://f-droid.org/en/packages/com.rtbishop.look4sat/") },
|
||||
text = stringResource(id = R.string.btn_fdroid),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun LinkButton(onClick: () -> Unit, text: String, modifier: Modifier = Modifier) {
|
||||
Button(
|
||||
onClick = { onClick() },
|
||||
colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.primaryVariant),
|
||||
modifier = modifier.padding(4.dp)
|
||||
) {
|
||||
Text(text = text, style = TextStyle(fontWeight = FontWeight.Bold), fontSize = 18.sp)
|
||||
}
|
||||
}
|
||||
|
||||
private fun gotoUrl(url: String) = startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
package com.rtbishop.look4sat.presentation.aboutScreen
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.rtbishop.look4sat.BuildConfig
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.presentation.MainTheme
|
||||
|
||||
@Preview(showBackground = true, widthDp = 400, heightDp = 720, showSystemUi = true)
|
||||
@Composable
|
||||
fun AboutScreen() {
|
||||
MainTheme {
|
||||
LazyColumn(
|
||||
contentPadding = PaddingValues(6.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(6.dp),
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) {
|
||||
item { CardAbout(BuildConfig.VERSION_NAME) }
|
||||
item { CardCredits() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun CardAbout(version: String, modifier: Modifier = Modifier) {
|
||||
val context = LocalContext.current
|
||||
ElevatedCard(modifier = modifier.fillMaxWidth()) {
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Row(horizontalArrangement = Arrangement.Center) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_satellite),
|
||||
tint = MaterialTheme.colorScheme.secondary,
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.size(96.dp)
|
||||
.padding(top = 8.dp, end = 8.dp)
|
||||
)
|
||||
Column {
|
||||
Text(
|
||||
text = stringResource(id = R.string.app_name),
|
||||
fontSize = 48.sp,
|
||||
color = MaterialTheme.colorScheme.secondary
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.app_version, version), fontSize = 21.sp
|
||||
)
|
||||
}
|
||||
}
|
||||
Text(
|
||||
text = stringResource(id = R.string.app_subtitle),
|
||||
fontSize = 21.sp,
|
||||
modifier = modifier.padding(top = 4.dp)
|
||||
)
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceEvenly,
|
||||
modifier = Modifier.padding(start = 4.dp, end = 4.dp)
|
||||
) {
|
||||
LinkButton(
|
||||
onClick = {
|
||||
gotoUrl(
|
||||
context, "https://sites.google.com/view/look4sat-privacy-policy/home"
|
||||
)
|
||||
},
|
||||
text = stringResource(id = R.string.btn_privacy),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
LinkButton(
|
||||
onClick = { gotoUrl(context, "https://www.gnu.org/licenses/gpl-3.0.html") },
|
||||
text = stringResource(id = R.string.btn_license),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun CardCredits(modifier: Modifier = Modifier) {
|
||||
val context = LocalContext.current
|
||||
ElevatedCard(modifier = modifier.fillMaxWidth()) {
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.outro_title),
|
||||
fontSize = 18.sp,
|
||||
color = MaterialTheme.colorScheme.secondary,
|
||||
modifier = modifier.padding(8.dp)
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.outro_thanks),
|
||||
fontSize = 16.sp,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = modifier.padding(start = 8.dp, end = 8.dp)
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.outro_license),
|
||||
fontSize = 18.sp,
|
||||
color = MaterialTheme.colorScheme.secondary,
|
||||
modifier = modifier.padding(start = 8.dp, end = 8.dp, top = 8.dp, bottom = 4.dp)
|
||||
)
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceEvenly,
|
||||
modifier = Modifier.padding(start = 4.dp, end = 4.dp)
|
||||
) {
|
||||
LinkButton(
|
||||
onClick = { gotoUrl(context, "https://github.com/rt-bishop/Look4Sat/") },
|
||||
text = stringResource(id = R.string.btn_github),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
LinkButton(
|
||||
onClick = { gotoUrl(context, "https://ko-fi.com/rt_bishop") },
|
||||
text = stringResource(id = R.string.btn_support),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
LinkButton(
|
||||
onClick = {
|
||||
gotoUrl(
|
||||
context, "https://f-droid.org/en/packages/com.rtbishop.look4sat/"
|
||||
)
|
||||
},
|
||||
text = stringResource(id = R.string.btn_fdroid),
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun LinkButton(onClick: () -> Unit, text: String, modifier: Modifier = Modifier) {
|
||||
Button(
|
||||
onClick = { onClick() },
|
||||
colors = ButtonDefaults.buttonColors(MaterialTheme.colorScheme.tertiary),
|
||||
modifier = modifier.padding(4.dp)
|
||||
) {
|
||||
Text(text = text, style = TextStyle(fontWeight = FontWeight.Bold), fontSize = 18.sp)
|
||||
}
|
||||
}
|
||||
|
||||
private fun gotoUrl(context: Context, url: String) {
|
||||
context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
|
||||
}
|
|
@ -15,6 +15,8 @@ import androidx.navigation.compose.composable
|
|||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import com.rtbishop.look4sat.presentation.MainTheme
|
||||
import com.rtbishop.look4sat.presentation.aboutScreen.AboutScreen
|
||||
import com.rtbishop.look4sat.presentation.entriesScreen.EntriesScreenView
|
||||
|
||||
@Composable
|
||||
fun BottomNavBar(navController: NavController) {
|
||||
|
@ -44,8 +46,8 @@ fun BottomNavBar(navController: NavController) {
|
|||
|
||||
@Composable
|
||||
fun NavigationGraph(navController: NavHostController) {
|
||||
NavHost(navController, startDestination = BottomNavItem.Satellites.screen_route) {
|
||||
composable(BottomNavItem.Satellites.screen_route) { SatellitesScreen() }
|
||||
NavHost(navController, startDestination = BottomNavItem.Passes.screen_route) {
|
||||
composable(BottomNavItem.Satellites.screen_route) { EntriesScreenView() }
|
||||
composable(BottomNavItem.Passes.screen_route) { PassesScreen() }
|
||||
composable(BottomNavItem.WorldMap.screen_route) { WorldMapScreen() }
|
||||
composable(BottomNavItem.Settings.screen_route) { SettingsScreen() }
|
||||
|
|
|
@ -4,7 +4,7 @@ import androidx.compose.foundation.background
|
|||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.wrapContentSize
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
|
@ -15,25 +15,6 @@ import androidx.compose.ui.text.style.TextAlign
|
|||
import androidx.compose.ui.unit.sp
|
||||
import com.rtbishop.look4sat.R
|
||||
|
||||
@Composable
|
||||
fun SatellitesScreen() {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(colorResource(id = R.color.background))
|
||||
.wrapContentSize(Alignment.Center)
|
||||
) {
|
||||
Text(
|
||||
text = "Satellites",
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = Color.White,
|
||||
modifier = Modifier.align(Alignment.CenterHorizontally),
|
||||
textAlign = TextAlign.Center,
|
||||
fontSize = 20.sp
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun PassesScreen() {
|
||||
Column(
|
||||
|
@ -90,22 +71,3 @@ fun SettingsScreen() {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun AboutScreen() {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(colorResource(id = R.color.background))
|
||||
.wrapContentSize(Alignment.Center)
|
||||
) {
|
||||
Text(
|
||||
text = "About",
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = Color.White,
|
||||
modifier = Modifier.align(Alignment.CenterHorizontally),
|
||||
textAlign = TextAlign.Center,
|
||||
fontSize = 20.sp
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,169 +0,0 @@
|
|||
package com.rtbishop.look4sat.presentation.entriesScreen
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.grid.GridCells
|
||||
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
|
||||
import androidx.compose.foundation.lazy.grid.items
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.ArrowRight
|
||||
import androidx.compose.material.icons.outlined.Close
|
||||
import androidx.compose.material.icons.outlined.Search
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.livedata.observeAsState
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.composed
|
||||
import androidx.compose.ui.platform.ComposeView
|
||||
import androidx.compose.ui.platform.ViewCompositionStrategy
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.domain.model.DataState
|
||||
import com.rtbishop.look4sat.domain.model.SatItem
|
||||
import com.rtbishop.look4sat.presentation.theme.Look4SatTheme
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@AndroidEntryPoint
|
||||
class EntriesFragmentCompose : Fragment() {
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||
): View {
|
||||
return ComposeView(requireContext()).apply {
|
||||
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
|
||||
setContent { Look4SatTheme { EntriesScreenView() } }
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun EntriesScreenView(viewModel: EntriesViewModel = viewModel()) {
|
||||
val dataState = viewModel.satData.observeAsState(DataState.Loading)
|
||||
Column(modifier = Modifier.padding(6.dp)) {
|
||||
Card { SearchBar(setQuery = { newQuery -> viewModel.setQuery(newQuery) }) }
|
||||
|
||||
Spacer(modifier = Modifier.height(6.dp))
|
||||
Card(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.weight(1f)
|
||||
) {
|
||||
LoadingOrList(state = dataState.value) { list, value ->
|
||||
viewModel.updateSelection(list, value)
|
||||
}
|
||||
}
|
||||
Spacer(modifier = Modifier.height(6.dp))
|
||||
EntryTypeBar(entryType = "All")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun EntryTypeBar(entryType: String, modifier: Modifier = Modifier) {
|
||||
val icon = Icons.Outlined.ArrowRight
|
||||
val text = "Selected type: $entryType"
|
||||
Card {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
// Icon(painter = painterResource(id = R.drawable.ic_next), contentDescription = null)
|
||||
Icon(imageVector = icon, contentDescription = null, modifier = modifier.size(48.dp))
|
||||
Text(text = text, maxLines = 1, modifier = modifier.fillMaxWidth())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun LoadingOrList(state: DataState<List<SatItem>>, onSelected: (List<Int>, Boolean) -> Unit) {
|
||||
when (state) {
|
||||
is DataState.Loading -> {
|
||||
LoadingProgress()
|
||||
}
|
||||
is DataState.Success -> {
|
||||
EntriesList(entries = state.data) { list, value -> onSelected(list, value) }
|
||||
}
|
||||
else -> {
|
||||
LoadingProgress()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun LoadingProgress() {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) { CircularProgressIndicator(modifier = Modifier.size(64.dp)) }
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
@Composable
|
||||
fun EntriesList(entries: List<SatItem>, onSelected: (List<Int>, Boolean) -> Unit) {
|
||||
LazyVerticalGrid(columns = GridCells.Adaptive(200.dp)) {
|
||||
items(items = entries, key = { item -> item.catnum }) { entry ->
|
||||
EntryItem(entry, onSelected, Modifier.animateItemPlacement())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun EntryItem(entry: SatItem, onSelected: (List<Int>, Boolean) -> Unit, modifier: Modifier) {
|
||||
Surface(color = MaterialTheme.colors.background, modifier = modifier) {
|
||||
Surface(modifier = modifier.padding(bottom = 1.dp)) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = modifier
|
||||
.background(MaterialTheme.colors.surface)
|
||||
.onClick { onSelected(listOf(entry.catnum), entry.isSelected.not()) }) {
|
||||
Checkbox(
|
||||
checked = entry.isSelected, onCheckedChange = null, Modifier.padding(6.dp)
|
||||
)
|
||||
Text(text = entry.name, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun SearchBar(setQuery: (String) -> Unit) {
|
||||
val currentQuery = rememberSaveable { mutableStateOf("") }
|
||||
OutlinedTextField(value = currentQuery.value, onValueChange = { newValue ->
|
||||
currentQuery.value = newValue
|
||||
setQuery(newValue)
|
||||
}, maxLines = 1,
|
||||
// label = { Text(text = stringResource(id = R.string.entries_search_hint)) },
|
||||
placeholder = { Text(text = stringResource(id = R.string.entries_search_hint)) },
|
||||
leadingIcon = {
|
||||
Icon(imageVector = Icons.Outlined.Search, contentDescription = null)
|
||||
}, trailingIcon = {
|
||||
Icon(imageVector = Icons.Outlined.Close,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.onClick {
|
||||
currentQuery.value = ""
|
||||
setQuery("")
|
||||
})
|
||||
},
|
||||
colors = TextFieldDefaults.outlinedTextFieldColors(
|
||||
focusedBorderColor = MaterialTheme.colors.onBackground,
|
||||
unfocusedBorderColor = MaterialTheme.colors.onBackground),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(MaterialTheme.colors.surface)
|
||||
)
|
||||
}
|
||||
|
||||
private fun Modifier.onClick(onClick: () -> Unit): Modifier = composed {
|
||||
clickable(remember { MutableInteractionSource() }, null) { onClick() }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,145 @@
|
|||
package com.rtbishop.look4sat.presentation.entriesScreen
|
||||
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.grid.GridCells
|
||||
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
|
||||
import androidx.compose.foundation.lazy.grid.items
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.ArrowForward
|
||||
import androidx.compose.material.icons.outlined.Close
|
||||
import androidx.compose.material.icons.outlined.Search
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.livedata.observeAsState
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.domain.model.DataState
|
||||
import com.rtbishop.look4sat.domain.model.SatItem
|
||||
import com.rtbishop.look4sat.presentation.onClick
|
||||
|
||||
@Composable
|
||||
fun EntriesScreenView() {
|
||||
val viewModel = hiltViewModel<EntriesViewModel>()
|
||||
val dataState = viewModel.satData.observeAsState(DataState.Loading)
|
||||
Column(modifier = Modifier.padding(6.dp)) {
|
||||
Card { SearchBar(setQuery = { newQuery -> viewModel.setQuery(newQuery) }) }
|
||||
Spacer(modifier = Modifier.height(6.dp))
|
||||
Card(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.weight(1f)
|
||||
) {
|
||||
LoadingOrList(state = dataState.value) { list, value ->
|
||||
viewModel.updateSelection(list, value)
|
||||
}
|
||||
}
|
||||
Spacer(modifier = Modifier.height(6.dp))
|
||||
EntryTypeBar(entryType = "All")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun EntryTypeBar(entryType: String, modifier: Modifier = Modifier) {
|
||||
val icon = Icons.Outlined.ArrowForward
|
||||
val text = "Selected type: $entryType"
|
||||
Card {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
// Icon(painter = painterResource(id = R.drawable.ic_next), contentDescription = null)
|
||||
Icon(imageVector = icon, contentDescription = null, modifier = modifier.size(48.dp))
|
||||
Text(text = text, maxLines = 1, modifier = modifier.fillMaxWidth())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun LoadingOrList(state: DataState<List<SatItem>>, onSelected: (List<Int>, Boolean) -> Unit) {
|
||||
when (state) {
|
||||
is DataState.Loading -> {
|
||||
LoadingProgress()
|
||||
}
|
||||
is DataState.Success -> {
|
||||
EntriesList(entries = state.data) { list, value -> onSelected(list, value) }
|
||||
}
|
||||
else -> {
|
||||
LoadingProgress()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun LoadingProgress() {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.Center, verticalAlignment = Alignment.CenterVertically
|
||||
) { CircularProgressIndicator(modifier = Modifier.size(64.dp)) }
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
@Composable
|
||||
fun EntriesList(entries: List<SatItem>, onSelected: (List<Int>, Boolean) -> Unit) {
|
||||
LazyVerticalGrid(columns = GridCells.Adaptive(200.dp)) {
|
||||
items(items = entries, key = { item -> item.catnum }) { entry ->
|
||||
EntryItem(entry, onSelected, Modifier.animateItemPlacement())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun EntryItem(entry: SatItem, onSelected: (List<Int>, Boolean) -> Unit, modifier: Modifier) {
|
||||
Surface(color = MaterialTheme.colorScheme.background, modifier = modifier) {
|
||||
Surface(modifier = modifier.padding(bottom = 1.dp)) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = modifier
|
||||
.background(MaterialTheme.colorScheme.surface)
|
||||
.onClick { onSelected(listOf(entry.catnum), entry.isSelected.not()) }) {
|
||||
Checkbox(
|
||||
checked = entry.isSelected, onCheckedChange = null, Modifier.padding(6.dp)
|
||||
)
|
||||
Text(text = entry.name, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun SearchBar(setQuery: (String) -> Unit) {
|
||||
val currentQuery = rememberSaveable { mutableStateOf("") }
|
||||
OutlinedTextField(
|
||||
value = currentQuery.value,
|
||||
onValueChange = { newValue ->
|
||||
currentQuery.value = newValue
|
||||
setQuery(newValue)
|
||||
},
|
||||
maxLines = 1,
|
||||
// label = { Text(text = stringResource(id = R.string.entries_search_hint)) },
|
||||
placeholder = { Text(text = stringResource(id = R.string.entries_search_hint)) },
|
||||
leadingIcon = {
|
||||
Icon(imageVector = Icons.Outlined.Search, contentDescription = null)
|
||||
},
|
||||
trailingIcon = {
|
||||
Icon(imageVector = Icons.Outlined.Close,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.onClick {
|
||||
currentQuery.value = ""
|
||||
setQuery("")
|
||||
})
|
||||
},
|
||||
// colors = TextFieldDefaults.outlinedTextFieldColors(
|
||||
// focusedBorderColor = MaterialTheme.colorScheme.onBackground,
|
||||
// unfocusedBorderColor = MaterialTheme.colorScheme.onBackground
|
||||
// ),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(MaterialTheme.colorScheme.surface)
|
||||
)
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.rtbishop.look4sat.presentation.theme
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
val Yellow = Color(0xFFFFE082)
|
||||
val TextWhite = Color(0xCCFFFFFF)
|
||||
val TextGrey = Color(0x66FFFFFF)
|
||||
val TextBlack = Color(0xFF000000)
|
||||
val ButtonGrey = Color(0xFF2A2A2A)
|
||||
val SurfaceGrey = Color(0xFF1C1C1C)
|
||||
val Background = Color(0xFF121212)
|
||||
val Transparent = Color(0x00000000)
|
|
@ -1,11 +0,0 @@
|
|||
package com.rtbishop.look4sat.presentation.theme
|
||||
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.Shapes
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
val Shapes = Shapes(
|
||||
small = RoundedCornerShape(12.dp),
|
||||
medium = RoundedCornerShape(12.dp),
|
||||
large = RoundedCornerShape(12.dp)
|
||||
)
|
|
@ -1,37 +0,0 @@
|
|||
package com.rtbishop.look4sat.presentation.theme
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.darkColors
|
||||
import androidx.compose.material.lightColors
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
fun Look4SatTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
|
||||
val colors = if (darkTheme) DarkColors else LightColors
|
||||
MaterialTheme(colors = colors, typography = Typography, shapes = Shapes, content = content)
|
||||
}
|
||||
|
||||
private val LightColors = lightColors(
|
||||
primary = SurfaceGrey,
|
||||
primaryVariant = ButtonGrey,
|
||||
secondary = Yellow,
|
||||
background = Background,
|
||||
surface = SurfaceGrey,
|
||||
onPrimary = TextWhite,
|
||||
onSecondary = TextBlack,
|
||||
onBackground = TextGrey,
|
||||
onSurface = TextWhite
|
||||
)
|
||||
|
||||
private val DarkColors = darkColors(
|
||||
primary = SurfaceGrey,
|
||||
primaryVariant = ButtonGrey,
|
||||
secondary = Yellow,
|
||||
background = Background,
|
||||
surface = SurfaceGrey,
|
||||
onPrimary = TextWhite,
|
||||
onSecondary = TextBlack,
|
||||
onBackground = TextGrey,
|
||||
onSurface = TextWhite
|
||||
)
|
|
@ -1,23 +0,0 @@
|
|||
package com.rtbishop.look4sat.presentation.theme
|
||||
|
||||
import androidx.compose.material.Typography
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
val Typography = Typography(
|
||||
body1 = TextStyle(
|
||||
fontFamily = FontFamily.Default, fontWeight = FontWeight.Normal, fontSize = 16.sp
|
||||
)
|
||||
// button = TextStyle(
|
||||
// fontFamily = FontFamily.Default,
|
||||
// fontWeight = FontWeight.W500,
|
||||
// fontSize = 14.sp
|
||||
// ),
|
||||
// caption = TextStyle(
|
||||
// fontFamily = FontFamily.Default,
|
||||
// fontWeight = FontWeight.Normal,
|
||||
// fontSize = 12.sp
|
||||
// )
|
||||
)
|
|
@ -7,16 +7,16 @@
|
|||
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_splash</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Look4Sat.Main" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<style name="Theme.Look4Sat.Main" parent="Theme.MaterialComponents.NoActionBar">
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
<item name="colorControlNormal">@color/textMain</item>
|
||||
<item name="colorPrimary">@color/accent</item>
|
||||
<item name="colorSecondary">@color/accent</item>
|
||||
<!-- Bottom bar colors-->
|
||||
<item name="colorOnSecondaryContainer">@color/background</item>
|
||||
<item name="colorOnSurfaceVariant">@color/textMain</item>
|
||||
<item name="colorSecondaryContainer">@color/accent</item>
|
||||
<item name="colorOnPrimaryContainer">@color/textMain</item>
|
||||
<!-- <item name="colorOnSecondaryContainer">@color/background</item>-->
|
||||
<!-- <item name="colorOnSurfaceVariant">@color/textMain</item>-->
|
||||
<!-- <item name="colorSecondaryContainer">@color/accent</item>-->
|
||||
<!-- <item name="colorOnPrimaryContainer">@color/textMain</item>-->
|
||||
<!-- -->
|
||||
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
|
||||
<item name="android:listDivider">@drawable/item_divider</item>
|
||||
|
@ -76,7 +76,7 @@
|
|||
<item name="android:backgroundTint">@color/accent</item>
|
||||
</style>
|
||||
|
||||
<style name="NormalButton" parent="Widget.Material3.Button.IconButton">
|
||||
<style name="NormalButton" parent="Widget.AppCompat.Button">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:backgroundTint">@color/buttonRegular</item>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
buildscript {
|
||||
ext {
|
||||
hilt_version = '2.44.2'
|
||||
hilt_compose_version = '1.0.0'
|
||||
application_version = '7.4.0'
|
||||
library_version = '7.1.2'
|
||||
kotlin_android_version = '1.8.0'
|
||||
|
@ -15,20 +16,14 @@ buildscript {
|
|||
json_version = '20220924'
|
||||
compose_version = '1.3.3'
|
||||
compose_compiler_version = '1.4.0'
|
||||
compose_foundation_version = '1.3.1'
|
||||
activity_compose_version = '1.6.1'
|
||||
compose_material_version = '1.3.1'
|
||||
material3_version = '1.0.1'
|
||||
material_adapter_version = '1.2.1'
|
||||
fragment_test_version = '1.5.5'
|
||||
leakcanary_version = '2.9.1'
|
||||
junit_version = '4.13.2'
|
||||
mockito_version = '4.9.0'
|
||||
robolectric_version = '4.9'
|
||||
coroutines_test_version = '1.6.4'
|
||||
androidx_test_version = '1.5.0'
|
||||
androidx_test_version = '1.5.2'
|
||||
androidx_junit_version = '1.1.5'
|
||||
espresso_version = '3.5.1'
|
||||
}
|
||||
dependencies {
|
||||
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
|
||||
|
|
Ładowanie…
Reference in New Issue