I created new login page in android studio. that activity xml looks good on Emulator but in real time mobile its looks like irregular alignments what can I do for that? I used Linear layout for that.
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
Most probably you hard-coded pixels, try converting to ConstrainsLayout. 1 LinerLayout can not provide enough flexibility if the layout is not simple.
The most efficient solution is to use ConstraintLayout.
ConstraintLayout has a flat view hierarchy, unlike other layouts, so it performs better than various other layouts. Only a single layout can handle your UI.
Or you may use a RelativeLayout, and then use LinearLayout as a child inside RelativeLayout, i.e., you will need to create a hierarchy with some nested views, which will adversely affect performance.