GUI Architecture of Android
- Android GUI is single-threaded, event-driven and built on a library of nestable components.
- The Android UI framework is organized around the common Model-View-Controller pattern.
- It provides structure and tools for building a Controller that handles user input (like key presses. And screen taps) and a View that renders graphical information to the screen.
The Model of GUI Architecture
- The model represents data or data container. We can see it as a database of pictures on our device. Let’s say, any user wants to hear an audio file, he clicks the play button and it triggers an event in our app. Now the app will get data from data store or database. And as per input and creates data to sent back to the user. We can refer this data as Model.
The View of GUI Architecture
- The View is the portion of the application responsible for rendering the display, sending audio to speakers, generating tactile feedback, and so on.
- Now as per above example, the view in a hypothetical audio player might contain a component that shows the album cover for the currently playing tune. The user will always interact with this layer. Also, the User action on this layer will trigger events that will go to the application functions.
The Controller of GUI Architecture
- The Controller is the portion of an application that responds to external actions: a keystroke, a screen tap, an incoming call, etc. Moreover, It implemented as an event queue. On User’s action, the control passed over to the controller. And also, this will take care of all logic that needs to do and prepare Model that needs to sent to the view layer.