BaDingOw BaDingOw - 6 months ago 26
Java Question

XML Preview looks different than in device

As written in the topic, I have an android App, which has a design - that design is being shown differently on my Phone than in the XML-Preview.

In Android Studio
In My Device

As you can see on my device, the button at the bottom is far more in the top than it should be. Any fixes?


This is because of the screen size. If you are just stacking the views in a LinearLayout they will take up whatever room they need and the the bottom will be blank. If you want you can make the button be pushed to the bottom by using layout_weight=1 on whichever view you want to take up the remaining space.