AviranAbady / CookieBar2

Android library for displaying text messages, notifications and alerts at the top or bottom of the screen. A great alternative for toast and snackbar alerts.
Apache License 2.0
667 stars 74 forks source link

Default padding #12

Closed MinaWadee closed 5 years ago

MinaWadee commented 5 years ago

please i want to remove the default padding in custom design

AviranAbady commented 5 years ago

Hey @MinaWadee. What default padding? When you use a custom layout, you control the entire view, including the padding.

MinaWadee commented 5 years ago

hey @AviranAbady in your code you add a default padding
int padding = getContext().getResources().getDimensionPixelSize(R.dimen.default_padding); if (layoutGravity == Gravity.BOTTOM) { layoutCookie.setPadding(padding, padding, padding, padding); } (dimen.default_padding) i want to set my custom padding which is "0dp"

AviranAbady commented 5 years ago

@MinaWadee, You are correct, thanks for the input.

In the next version I will add a way to set globaly the padding value.

For now, you can easily workaround the issue using by setting a dimen value with the same name in your project (app module), it will override the value set by cookiebar2.

MinaWadee commented 5 years ago

@AviranAbady thank you for your support

AviranAbady commented 5 years ago

@MinaWadee feature has been added, cookie padding can be set globally using the cookiePadding attribute.

<item name="cookiePadding">50dp</item>

Released in version 1.1.2