Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

Button positioning API #453

Open
alexfu opened this issue Dec 6, 2017 · 0 comments
Open

Button positioning API #453

alexfu opened this issue Dec 6, 2017 · 0 comments

Comments

@alexfu
Copy link

alexfu commented Dec 6, 2017

Would be nice to have an abstracted API to set the buttons position without having to know the details of the underlying layout (i.e. RelativeLayout). Ideally, I would just be able to do this:

ShowcaseView showcaseView = ShowcaseView.Builder(activity).build();
showcaseView.setButtonPosition(Gravity.TOP|Gravity.LEFT);

or something similar, as opposed to:

ShowcaseView showcaseView = ShowcaseView.Builder(activity).build();
RelativeLayout.LayoutParams lps = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
lps.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
lps.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
showcaseView.setButtonPosition(lps);

Also, if the underlying layout ever changes, then the public facing API would certainly need to change. Not exactly ideal.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant