I get confused while setting modifiers for differe...
# compose-android
p
I get confused while setting modifiers for different composable functions if i create a composable function that function create a whole ui as of now since o have made only basic apps which contains for eg image text or icons etc so i used a fill max size() modifier function now where should i pass it should i pass it in the function where i am previewing and calling the function which comtains the ui or should i write it in the row or column parent composable in the function that contains the ui coz just sometimes for eg if it is a column composable only first element of the column is visible and just takes the entire screen
s
Just follow what's described here https://chrisbanes.me/posts/always-provide-a-modifier/ The modifier passed to your composable should be passed once at the top level composable layout emitted by your composable
👍 2
p
Thanks a lot for this and i would make sure not to post the same questions actually i am new to slack
s
That's perfect, I assumed you were new, that's why I mentioned it so you know it's not a good idea 😊 I hope the article cleared up your question too
🙂 1