Explanation about tags of Android components

Asked

Viewed 202 times

3

I’m developing a app for Android. I found some tutorials to help me in the development but found some tags that I did not understand their proper explanations and when I should use each of them.

Are they:

  • Thread
  • Surfaceview
  • Surface Holder
  • Holder

I’ve researched several places on the internet, bought a book of Android but I still don’t get it right. Can you help me?

Thank you

1 answer

7


These tags you are doubtful is what we call components on Android.

They help when creating a project,.

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 run in the same thread.

When an application is started, the system creates a running thread for the application, called "main". This thread is very important as it is responsible for dispatching events to user interface widgets appropriately, including design events. It is also the segment where your app 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 segment.By default all components follow the same thread.

For better information look here in the documentation on :

https://developer.android.com/guide/components/processes-and-threads.html#Threads

Surfaceview :

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

For better information look here in the documentation on :

https://developer.android.com/reference/android/view/SurfaceView.html

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 application surfaces and systems into a single buffer) and makes them for the final display in their correct Z-order. A surface usually has more than one buffer (usually two) to render.

For better information look here in the documentation on :

https://developer.android.com/reference/android/view/Surface.html

Surface Holder :

Abstract interface for someone holding a display surface. Allows you to control the size and format of surfaces, edit the pixels on the surface, and monitor changes on the surface. This interface is normally available through the Surfaceview class.

For better information look here in the documentation on :

https://developer.android.com/reference/android/view/SurfaceHolder.html

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.