This file contains hidden or 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
| public final class ActivityAwesomeBinding implements ViewBinding { | |
| @NonNull | |
| private final ConstraintLayout rootView; | |
| @NonNull | |
| public final Button button; | |
| @NonNull | |
| public final TextView subtext; |
This file contains hidden or 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
| public final class ActivityAwesomeBinding implements ViewBinding { | |
| @NonNull | |
| private final ConstraintLayout rootView; | |
| @NonNull | |
| public final Button button; | |
| @NonNull | |
| public final TextView subtext; | |
| @NonNull | |
| public final TextView title; |
This file contains hidden or 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
| private ActivityAwesomeBinding(@NonNull ConstraintLayout rootView, @NonNull Button button, | |
| @NonNull TextView subtext, @NonNull TextView title) { … } | |
| @NonNull | |
| public static ActivityAwesomeBinding inflate(@NonNull LayoutInflater inflater) { | |
| /* Edited: removed call to overload inflate(inflater, parent, attachToParent) */ | |
| View root = inflater.inflate(R.layout.activity_awesome, null, false); | |
| return bind(root); | |
| } |
This file contains hidden or 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 […]"); |
This file contains hidden or 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
| public final class ActivityAwesomeBinding implements ViewBinding { | |
| ... | |
| @NonNull | |
| public final IncludedButtonsBinding includes; |
This file contains hidden or 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
| <!-- activity_awesome.xml --> | |
| <androidx.constraintlayout.widget.ConstraintLayout> | |
| <include android:id="@+id/includes" layout="@layout/included_buttons" | |
| </androidx.constraintlayout.widget.ConstraintLayout> | |
| <!-- included_buttons.xml --> | |
| <androidx.constraintlayout.widget.ConstraintLayout> | |
| <Button android:id="@+id/include_me" /> | |
| </androidx.constraintlayout.widget.ConstraintLayout> |
This file contains hidden or 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
| import androidx.compose.* | |
| import androidx.ui.foundation.Text | |
| import androidx.ui.graphics.Color | |
| import androidx.ui.layout.Column | |
| import androidx.ui.material.Button | |
| import androidx.ui.material.Checkbox | |
| import androidx.ui.material.MaterialTheme | |
| import androidx.ui.material.Surface | |
| import androidx.ui.tooling.preview.Preview |
This file contains hidden or 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
| /* | |
| * Copyright 2020 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
| /* | |
| * Copyright 2020 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
| /* | |
| * Copyright 2020 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |