what does find view by id does in android studio code example
Example: findview by id in android
This is because findViewById() searches in the activity_main layout, while the button is located in the fragment's layout fragment_main.
This is because findViewById() searches in the activity_main layout, while the button is located in the fragment's layout fragment_main.