Hi everyone I am creating a custom BottomBar by ex...
# android
v
Hi everyone I am creating a custom BottomBar by extending
BaseTransientBottomBar
. But it is taking bottom Margin I want it to stick to bottom but it takes some default Bottom Margin. I am using below code to remove the bottom margin
Copy code
(view.layoutParams as MarginLayoutParams).setMargins(margin10, 0, margin10, 0)
Is there any way to remove the bottom margin?
f
Are you testing in an android 10 device?
v
No. In APi 24
Moreover by code its not working I tried adding in style then it worked partially
I mean in style if I set layoutmargin 0 then only it works but If I add layout_marginStart it doesnot work
I have to remove bottomMargin from style and using layout_margin and then giving Side margins in code
Thats a little wierd
If you have any other way to implement then please let me know
f
Have you checked if there is any default padding?