Obviously your layout will have to adapt to any device, not just your smartphone (unless you want to create the app only for yourself and only for that device).
For the umpteenth time, that manufacturers should standardize the ratio between height and base of displays, 16: 9 like televisions!
Since your problem was exclusively in the height of the base panel, which overflowed from the variant, I temporarily undocked its "height", to see its value and then I did the various calculations.
I think that a minimum height of the views, expressed in dips, should be taken into consideration from the beginning. A Button, for example, I think it shouldn't be lower than 45 dips; Labels with a single line of text 30dips as a minimum.
Starting from these basics, if your layout in height is larger than the 480 dips of the default variant, it is better to enlarge it, proportionally compared to the 320 dips of the width.