O'Reilly logo

Xamarin Studio for Android Programming: A C# Cookbook by Mathieu Nayrolles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required