An Activity is a single screen of the User interface. This Activity can hold a hierarchy of views to give the UI the functionality it needs. For example, an email-application. We can have two Activities, one to list all the mails we have received (and to interact with them) and other Activity to write and send an email. Both Activities are related, but they work separately in their own.
A Service runs in the background, it doesn’t have UI. An example of Service can be a system that notifies the user when a sms or an email has been received in the mobile.
With the content provider we can access to any data stored in the device form other applications or even form our applications. This data can be stored in files or is the SQLite database.
Layouts are containers of elements in the User Interface. Every time we define a .xml file with a specific user interface, we need to use this elements to hold hierarchy view tree. As I have wrote in other article, we can find different layouts kinds, depending its properties and relationship with the elements its holds. Layouts can be nested one inside other.
A View is a single object of the user interface. This Views are placed inside the Layouts and with them we can create from the most simplest UI to the most complex one. Android give us the choice to work with XML to create UI, this is a good way to separate functionality from User Interface. Views can be Images (ImageView), Text (TextView)…
Events (On click, onTouch)
We have to define the events listeners to capture this events.
An Event is something that happens form the “outside", is something we don’t control, something we don’t know when its going to happen. For that we use the Events controllers, for each event that can happen, we can define how the system is going to behave. A common event is onTouch Event, this is when the screen is touched. We have to define the events listeners to capture this events.
Resources are the external elements we use in our applications. They are placed in the “res" folder and they can be, images, music, videos. Here, in this folder is stored the .xml files: User Interfaces, styles, strings we use in the App, themes… Once resources are compiled, they are fully available in Java code using the "R.java" file. We will see this in further examples.