Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add top and bottom padding extensions #57

Merged
merged 2 commits into from
Mar 24, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add top and bottom padding extensions
  • Loading branch information
LouisCAD committed Mar 24, 2018
commit 85ae9bcd818cb8f1cad6b6b7f4e6626638f786f8
8 changes: 8 additions & 0 deletions views/src/main/java/splitties/views/Padding.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ inline var View.verticalPadding: Int
@Deprecated(NO_GETTER, level = HIDDEN) get() = noGetter
set(value) = setPadding(paddingLeft, value, paddingRight, value)

inline var View.topPadding: Int
get() = paddingTop
set(value) = setPadding(paddingLeft, value, paddingRight, paddingBottom)

inline var View.bottomPadding: Int
get() = paddingBottom
set(value) = setPadding(paddingLeft, paddingTop, paddingRight, value)

fun View.setPaddingDp(start: Int = 0,
top: Int = 0,
end: Int = 0,
Expand Down