Is it possible to remove Vertical padding from Out...
# compose
k
Is it possible to remove Vertical padding from OutlinedTextField?
c
You can inspect the source. Looks like the answer is no. (Also the padding exists to maintain visibility for the label. Your use case doesn’t use the label I guess?) Composables in
androidx.compose.material
will be opinionated, designed to work a certain way. So if you want to deviate, you should use
BasicTextField
directly
c
I think material sorta recently added options to update padding?
k
Seems like it's possible non material3 lib..
c
@Louis Pullen-Freilich [G] do you know if this is possible now?
l
Should be possible with
TextFieldDecorationBox
k
Yes, this is what I've used. Did need to import an additional material lib if I remember correctly, meaning, it did not come directly with
androidx.compose.material3:material3