Is it possible to remove Vertical padding from OutlinedTextField?
c
Chris Fillmore
09/23/2022, 3:51 PM
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
Colton Idle
09/23/2022, 6:30 PM
I think material sorta recently added options to update padding?
k
K Merle
09/24/2022, 4:32 AM
Seems like it's possible non material3 lib..
c
Colton Idle
09/26/2022, 6:01 PM
@Louis Pullen-Freilich [G] do you know if this is possible now?
l
Louis Pullen-Freilich [G]
09/26/2022, 6:04 PM
Should be possible with
TextFieldDecorationBox
k
K Merle
09/27/2022, 5:19 AM
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