Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mobile DevOps

You're reading from   Mobile DevOps Deliver continuous integration and deployment within your mobile applications

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher Packt
ISBN-13 9781788296243
Length 376 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Rohin Tak Rohin Tak
Author Profile Icon Rohin Tak
Rohin Tak
Jhalak Modi Jhalak Modi
Author Profile Icon Jhalak Modi
Jhalak Modi
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction 2. Working with Code Repository Systems FREE CHAPTER 3. Cross-Platform Mobile App Development with Xamarin 4. Writing Your First Android Application with Xamarin 5. Implementing Automatic Testing Using Xamarin 6. Configuring TeamCity for CI/CD with Xamarin 7. CI/CD for Android with Visual Studio Team Services 8. Deploying Applications on AWS 9. Monitoring and Optimizing Application 10. Debugging the Application 11. Case Studies 12. Other Books You May Enjoy

Handling user interactions

User interaction is the most important aspect of developing a mobile application. A mobile app should be interactive and easy to use.

In this basic application, we will be writing our user interaction code in C# and it will be part of the MainActivity.cs file:

  1. Let's click on the MainActivity.cs file from the Solution Explorer on the left and open it:

It has some autogenerated code that we are going to modify in order to make our application work.

  1. We need to write our code inside the OnCreate() method of the MainActivity.cs file:

Before we start writing user interaction code, let's understand the autogenerated code first:

base.OnCreate(savedInstanceState); 

This piece of code calls the OnCreate() method of the parent/base class of MainActivity.cs, which is Activity.cs.

SetContentView(Resource.Layout.Main); 

As the comments already say...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image