Last active
January 28, 2020 19:37
-
-
Save objcode/8f555c8c007634565ff513f2e7693e21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NonNull | |
public static ActivityAwesomeBinding bind(@NonNull View rootView) { | |
/* Edit: Simplified code – the real generated code is an optimized version */ | |
Button button = rootView.findViewById(R.id.button); | |
TextView subtext = rootView.findViewById(R.id.subtext); | |
TextView title = rootView.findViewById(R.id.title); | |
if (button != null && subtext != null && title != null) { | |
return new ActivityAwesomeBinding((ConstraintLayout) rootView, button, subtext, title); | |
} | |
throw new NullPointerException("Missing required view […]"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment