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

Ask a question #137

Closed
makhocheung opened this issue Aug 14, 2019 · 1 comment
Closed

Ask a question #137

makhocheung opened this issue Aug 14, 2019 · 1 comment

Comments

@makhocheung
Copy link

linearLayout(() -> {
                size(MATCH, MATCH);
                padding(dip(8));
                orientation(LinearLayout.VERTICAL);

                textView(() -> {
                    size(MATCH, WRAP);
                    text("Tick-tock: " + ticktock);
                });

                button(() -> {
                    size(MATCH, WRAP);
                    text("Close");
                    // Finish current activity when the button is clicked
                    onClick(v -> finish());
                });
            });

How can Java invoke "size", "padding", "textView" methods in a lamda?

@sgrekov
Copy link
Collaborator

sgrekov commented Aug 14, 2019

Why it shouldn't? Those methods are static methods, they can be called from anywhere.

@sgrekov sgrekov closed this as completed Aug 31, 2019
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

No branches or pull requests

2 participants