Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why absolutelayout is deprecated? [closed]

why absolutelayout is deprecated? I know that it may cause problems in supporting multiple screens but was better for showing view at particular position.

like image 490
Dhruv Mevada Avatar asked Sep 13 '11 11:09

Dhruv Mevada


People also ask

Why is the Absolutelayout not recommended for use?

The absolute layout is less flexible and harder to maintain for varying sizes of screens that's why it is not recommended.

What is the main disadvantage of absolute layout?

Absolute layouts are less flexible and harder to maintain than other types of layouts without absolute positioning.

What is relative layout in Android?

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).


1 Answers

Because absolute positioning is not too much useful in world of various screen resolutions and aspect ratios. You'd usually leave element positioning to be computed by more flexible layouts.

From docs: Absolute layouts are less flexible and harder to maintain than other types of layouts without absolute positioning.

However, if it fits your special purpose, just use it.

like image 179
Pointer Null Avatar answered Oct 05 '22 06:10

Pointer Null