When I set the modifier as below
class MainActivity: AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
Clock(modifier = Modifier
.aspectRatio(1f)
.fillMaxSize()
.padding(16.dp))
}
}
}
I have both fillMaxSize()
and aspectRaio(1f)
as per I see other people code and have both set. Are they doing the same thing? Or they are needed for different purposes? (I tried removing one of each, and seems to result the same).
P/S: I tried to view the code to understand the different but can't as per How to see JetpackCompose kotlin source in Android Studio (4.2)?