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

Button positioning APIΒ #453

@alexfu

Description

@alexfu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions