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
Next Next commit
Reorder padding extensions
  • Loading branch information
LouisCAD committed Mar 24, 2018
commit 51bd81441d4ba7e7b83544e8e0a53e69017cab7b
8 changes: 4 additions & 4 deletions views/src/main/java/splitties/views/Padding.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ import android.view.View
import splitties.dimensions.dip
import kotlin.DeprecationLevel.HIDDEN

inline var View.padding: Int
@Deprecated(NO_GETTER, level = HIDDEN) get() = noGetter
set(value) = setPadding(value, value, value, value)

inline var View.horizontalPadding: Int
@Deprecated(NO_GETTER, level = HIDDEN) get() = noGetter
set(value) = setPadding(value, paddingTop, value, paddingBottom)
Expand All @@ -28,10 +32,6 @@ inline var View.verticalPadding: Int
@Deprecated(NO_GETTER, level = HIDDEN) get() = noGetter
set(value) = setPadding(paddingLeft, value, paddingRight, value)

inline var View.padding: Int
@Deprecated(NO_GETTER, level = HIDDEN) get() = noGetter
set(value) = setPadding(value, value, value, value)

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