Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is the lightest view?

Tags:

android

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.

like image 219
Android Fan Avatar asked Jun 25 '11 07:06

Android Fan


People also ask

Which layout is faster in Android?

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.

Which layout is better in Android Studio?

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.

Which layout is best for large hierarchies?

Consider using flatter layouts such as RelativeLayout or GridLayout to improve performance.

What is flat view hierarchy?

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.


1 Answers

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.

like image 198
lee Avatar answered Sep 21 '22 17:09

lee