If you can try it out on a real Android device do so - it is easier to find out what it really feels like. Also do have a look at what the layout looks like on a range of screens and orientations.
This isn't much of a calculator, but you could make it into a really good one.
right align the text in the display
add a + and - button and implement the action
allow the user to enter multi-digit number
add a decimal point key and all a multi-digit float
add * an / keys
add a clear key
and so on...
There are better ways to implement the layout and we will come back to the calculator program in later chapters.
Summary
You can create the XML layout file by hand, but using the Designer is easier.
It is still useful to know how the XML file works so that you can edit it when the Designer lets you down in some way.
The Designer modifies the way components look in the Layout by changing a component's properties.
How you position a component depends on the Layout you are using.
The RelativeLayout lets you position components relative to each other or to the container.
The Designer may change multiple properties to position the component where you want it.
Use the Component Tree to select components that are difficult to select in the Designer.
You can use the property window to select and directly set any property.
If you find positioning or sizing difficult in the Designer try zooming in.
You can use Android Studio to view what your app looks like on various screen sizes and orientations.
Different orientations and resolutions can be accommodated by creating additional layout files all with the same name. The system will pick which one to use at run time.
You can copy and paste components in the Designer to quickly build up repeated UI designs.
A single event handler can be attached to many components.
Android Programming In Java: Starting With an App Third Edition