Skip to content

Instantly share code, notes, and snippets.

@MyricSeptember
Created January 27, 2022 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MyricSeptember/7490a68cd7353ca0d591a66aa1edd729 to your computer and use it in GitHub Desktop.
Save MyricSeptember/7490a68cd7353ca0d591a66aa1edd729 to your computer and use it in GitHub Desktop.
Shows data retrieved from the data source
val country = countryId?.let { it1 -> CountryRepository.findCountry(it1) }
Column(
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Text(
text = "${country?.name} ",
fontSize = 30.sp,
fontWeight = FontWeight.Bold
)
Spacer(modifier = Modifier.height(10.dp))
Text(text = "Population", fontWeight = FontWeight.Bold)
Text(text = "${country?.population}")
Spacer(modifier = Modifier.height(6.dp))
Text(text = "Largest City", fontWeight = FontWeight.Bold)
Text(text = "${country?.largest_city} ")
Spacer(modifier = Modifier.height(6.dp))
Text(text = "Capital City", fontWeight = FontWeight.Bold)
Text(text = "${country?.capital_city} ")
Spacer(modifier = Modifier.height(6.dp))
Text(text = "Major Language", fontWeight = FontWeight.Bold)
Text(text = "${country?.major_language} ", textAlign = TextAlign.Center)
Spacer(modifier = Modifier.height(6.dp))
Text(text = "Major Religion", fontWeight = FontWeight.Bold)
Text(text = "${country?.major_religion} ")
Spacer(modifier = Modifier.height(6.dp))
Text(text = "Monetary Unit", fontWeight = FontWeight.Bold)
Text(text = "${country?.monetary_unit} ")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment