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

Incompleted wiki while creating your own Dialog #19

Closed
AngeloAvv opened this issue Dec 5, 2017 · 3 comments
Closed

Incompleted wiki while creating your own Dialog #19

AngeloAvv opened this issue Dec 5, 2017 · 3 comments

Comments

@AngeloAvv
Copy link

Hi, in this wiki the instructions are not complete. If you don't create your own builder which instantiates your custom class, the Dialog will show an empty view. In my case I added:

    public static JustifyDialog build() {
        return new JustifyDialog();
    }

to solve the problem. This should be a mandatory instruction, maybe could save other's people time

@eltos
Copy link
Owner

eltos commented Dec 5, 2017

Sure, nothing else is to be expected as you are calling the build method of SimpleDialog then.
I expected people to realise this right away (or call the constructor directly), but you are totally right it's missing in the wiki (sorry having wasted your time :/). I just added it to the wiki. Thanks for your feedback.

What do you think about adding the following to CustomViewDialog? This will hopefully save other people's time as well.

public static CustomViewDialog build(){
    throw new java.lang.InstantiationError("Unintended abuse of the builder method. " +
            "Have you created your own build() method in your custom dialog?");
}

@AngeloAvv
Copy link
Author

Well it could be a good practice throwing an exception if someone uses the builder but doesn't call the right one. Anyway don't feel sorry about that, we're here to help each other :)
BTW I just need to say thank you about this wonderful library, I do really appreciate your work 👍

eltos added a commit that referenced this issue Dec 5, 2017
@eltos
Copy link
Owner

eltos commented Dec 5, 2017

Thanks :)

@eltos eltos added this to the v2.3 milestone Dec 28, 2017
This was referenced Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants