If AbsoluteLayout is deprecated what can I use instead of it?
I've done an app that uses AbsoluteLayout but it doesn't work well with the different screen resolutions. I use because I can set the X and Y position of a button. Can I set the position of a button using another layout?
Absolute Layout:- This is not recommended for most UI development (in fact Absolute Layout is currently deprecated) since absolutely positioning every element on the screen makes an inflexible UI, that is much more difficult to maintain.
Part of the reason AbsoluteLayout is deprecated is because it does not support multiple screen sizes well. Any direct corollary to AbsoluteLayout (e.g., FrameLayout with margins) will suffer the same problem.
RelativeLayout is a view group that displays child views in relative positions. The position of each view can be specified as relative to sibling elements (such as to the left-of or below another view) or in positions relative to the parent RelativeLayout area (such as aligned to the bottom, left or center).
An Absolute Layout allows you to specify the exact location .
you can use RelativeLayouts as described here: Set the absolute position of a view
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With