Introduction:
After learning several android layout methods, we made an android calculator.
I searched the internet for this information and found that there was a problem with the layout, not full of the screen, but only accounted for a part.
The instructor's suggestion is: Setting the font size is the key. However, after I fixed the font size problem and solved the screen problem, I found that the font was not centered. On the left side of the horizontal line. The attribute used later has not changed. But later I found that this attribute does not appear to be used, and a Layout is used for nesting to solve this problem.
The implementation result is as follows:
The xml file code in LayOut is as follows:
View Code
25sp45dp
Note: If the whole screen is not fully covered during copying, change
The two parameters to be added to the dimens file.
Copy the Translation results to Google