Understanding the setContentView Method in Android – This is an important piece of our Android development of creating an application because it allows us to create a view. The first thing the users open the application. In fact they can come to layout and right click to create a resource file.
Constraint Route
So we want the root element to be the constraint route. The reason we want to see the strange layouts. I can put constraints if I wish to do so as well. Now how do we then show our new another layout instead of the activity layout which is what we already had.
Also Read: Overview Of Android Architecture Components With Examples
And it seems like we haven’t really changed or given an I.D. with this button. Well it is the idea that was given automatically. That’s fine. Button like that. And coming back here we have the button there. setContentView Method
Creating Listener
Similar calling and doing it the old way and can see a new button such dot set on click listener say new on click listener enter you say log D like that. Change this to something else new button.
And I can say. All right save and run now. Once again I should have probably clicked on the refresh there but that’s fine.