Explanation about tags of Android components

1

I'm developing an app for android. I found some tutorials to help me in the development but I found some tags that did not understand their due explanations and when should I use each of them.

They are:

Thread SurfaceView Surface holder Holder

I've researched several places on the internet, bought an android book but still do not get it right. Can you help me?

Thank you

    
asked by anonymous 16.06.2016 / 14:38

1 answer

4

These tags that you are in doubt are what we call components on Android.

They help at the time of creating a project, so I'll explain briefly about each one.

Thread:

When an application starts and this application does not have any other components running, the Android system starts a new Linux process for the application with a single thread running. By default all components of the same application work on the same thread .

When an application is started, the system creates an execution thread for the application, called "master". This thread is very important because it is responsible for dispatching events to the UI widgets appropriately, including drawing events. It is also the thread in which your application interacts with components of the Android UI toolkit (components of the android.widget and android.view packages). As such, the main thread is also sometimes called a thread. By default all components follow the same thread.

For more information look here in the documentation on:

link

SurfaceView:

Provides a dedicated drawing surface embedded within a view hierarchy. You can control the shape of this surface and, if you like, its size; SurfaceView takes care of putting the surface in the correct place on the screen.

For more information look here in the documentation on:

link

Surface:

The surface is an object holding pixels that are being composed for the screen. Each window you see on the screen (a dialog box, its full-screen activity, the status bar) has its own surface that it draws to the Surface Flinger (responsible for composing all surfaces of applications and systems in a single buffer) and makes them to the final view in their correct Z-order. A surface usually has more than one buffer (usually two) to render.

For more information look here in the documentation on:

link

Surface Holder:

Abstract interface for someone holding a display surface. It allows you to control the size and shape of surfaces, edit the pixels on the surface, and monitor surface changes. This interface is usually available through the SurfaceView class.

For more information look here in the documentation on:

link

Look for more about these components as they are important for when you want to dig deeper into the issue of understanding Android better. Generally, take a look at their documentation and search more deeply, you can heal these questions.

    
16.06.2016 / 15:14