In Android, Which is the light weight view ? ex:- View, Textview, Edittext, etc....
In some case we need to use a view to fill the area without showing the view to the user. At the same time the screen should load fast.
Results show that the fastest layout is Relative Layout, but difference between this and Linear Layout is really small, what we can't say about Constraint Layout. More complex layout but results are the same, flat Constraint Layout is slower than nested Linear Layout.
Use FrameLayout, RelativeLayout or a custom layout instead. Those layouts will adapt to different screen sizes, whereas AbsoluteLayout will not. Definitely right. I recommend RelativeLayout since it keeps the view hierachy flat.
Consider using flatter layouts such as RelativeLayout or GridLayout to improve performance.
A flat organization (also known as horizontal organization or flat hierarchy) has an organizational structure with few or no levels of middle management between staff and executives.
You can use Space.
android.widget.Space
Space is a lightweight View subclass that may be used to create gaps between components in general purpose layouts.
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