Practicing the activities' lifecycles

The Android's Activity class exposes seven methods for managing the different states. These seven methods are in protected visibility, meaning that anyone specializing the Activity class will be able to override these methods. If we take a look at our MainActivity declaration again, we can see that MainActivity specializes the Activity class using the : symbol:

[Activity (Label = "Hello_World", MainLauncher = true)]
public class MainActivity : Activity

Tip

The inheritance mechanism is also referred to as specialization. It is a strong object-oriented mechanism that establishes an "Is-a" relationship. Classes inherit attributes, methods, and behavior of the classes they specialize. The classes that are an outcome ...

Get Xamarin Studio for Android Programming: A C# Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.