Skip to content

#22 Allow horizontal and vertical padding to be set independently#23

Open
Tyler-Lopez wants to merge 1 commit into
jayrambhia:masterfrom
Tyler-Lopez:lopez/padding-horizontal-and-vertical
Open

#22 Allow horizontal and vertical padding to be set independently#23
Tyler-Lopez wants to merge 1 commit into
jayrambhia:masterfrom
Tyler-Lopez:lopez/padding-horizontal-and-vertical

Conversation

@Tyler-Lopez
Copy link
Copy Markdown

Background

The margin from the coachmark to its anchor and the screen edge is currently set by a single integer value. This failed my use-case of a TOP or BOTTOM coachmark that should be a certain distance horizontally from the screen-edge, but very close to its anchoring view.

Changes

This commit introduces two new Builder functions: withPaddingHorizontal and withPaddingVertical.

The private parameter padding has been split into paddingHorizontal and paddingVertical and these functions set the respective value.

The existing Builder function withPadding sets both paddingHorizontal and paddingVertical and is unchanged.

…dently

### Background

The margin from the coachmark to its anchor and the screen edge is currently set by a single integer value. This failed my use-case of a TOP or BOTTOM coachmark that should be a certain distance horizontally from the screen-edge, but very close to its anchoring view.

### Changes

This commit introduces two new `Builder` functions: `withPaddingHorizontal` and `withPaddingVertical`.

The private parameter `padding` has been split into `paddingHorizontal` and `paddingVertical` and these functions set the respective value.

The existing `Builder` function `withPadding` sets both `paddingHorizontal` and `paddingVertical` and is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant