-
Notifications
You must be signed in to change notification settings - Fork 5
Update codebase and SplashScreen implementation #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add more details in PR description and screenshot too
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary empty lines
modifier = Modifier.fillMaxSize(), | ||
color = colorResource(id = R.color.app_black) | ||
) { | ||
showSplash() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explore this api - androidx.core:core-splashscreen
horizontalAlignment = Alignment.CenterHorizontally, | ||
|
||
) { | ||
val ctx = LocalContext.current; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable naming could be more better
|
||
) { | ||
val ctx = LocalContext.current; | ||
Text(text = "Welcome", color = colorResource(id = R.color.white), fontWeight = FontWeight.Bold, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no hardcode strings
|
||
) { | ||
val ctx = LocalContext.current; | ||
Text(text = "Welcome", color = colorResource(id = R.color.white), fontWeight = FontWeight.Bold, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
color can be use from Color.kt file
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
contentDescription ="image", | ||
alignment = Alignment.Center, | ||
|
||
modifier = Modifier.matchParentSize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it required?
) { //Surface(modifier = Modifier.fillMaxSize(), color = colorScheme.background) { | ||
// Lottie animation screen. | ||
ComposeLottieScreen() | ||
//} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we clean?
@Composable | ||
fun ComposeLottieScreen() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a separate file for these UI functions?
horizontalAlignment = CenterHorizontally, | ||
|
||
) { | ||
val sContext = LocalContext.current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does s stands for in sContext
?
update the changes with name and create new file for the splash-screen module |
) { | ||
val sContext = LocalContext.current | ||
Text( | ||
text = sContext.getString(R.string.welcome), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stringResources()
} | ||
} | ||
|
||
private fun isInternetAvailable(context: Context): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate file
Basic splashscreen and icon added