Buttons not visible on the application. What's wrong?

I created an empty activity for 'My Testing App' and it looks like the following in the preview section:

The Preview tab screenshot.

But when I generated a build apk and used the same in my cell phone the result was like the following:

A screenshot of my cell phone.

I can only view the exit button on the very top left but the two other buttons, that should be above it are missing. I tried to rearrange the icons on the screen as well. I made them to go to the bottom, to the right most, but I see no change when the apk is reinstalled.

How do I make them visible on the hardware?

Here is the snap of the code for this activity:

enter image description here


Solution 1:

To quickly add constraints to your layout just click on the Infer Constraints enter image description here button in the Layout Editor toolbar. Learn more about the feature here: https://developer.android.com/training/constraint-layout/index.html#use-autoconnect-and-infer-constraints

Solution 2:

Right Click on you Layout and select "Convert View" Option. then select "LinearLayout" Option. it will show all three buttons in the output.