Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Xamarin Mobile Application Development for Android, Second Edition
  • Table Of Contents Toc
Xamarin Mobile Application Development for Android, Second Edition

Xamarin Mobile Application Development for Android, Second Edition

By : Panigrahy
2.7 (3)
close
close
Xamarin Mobile Application Development for Android, Second Edition

Xamarin Mobile Application Development for Android, Second Edition

2.7 (3)
By: Panigrahy

Overview of this book

Technology trends come and go, but few have generated the excitement, momentum, or long-term impact that mobile computing has. Mobile computing impacts people’s lives at work and at home on a daily basis. Many companies and individual developers are looking to become a part of the movement but are unsure how to best utilize their existing skills and assets. The Xamarin suite of products provides new opportunities to those who already have a significant investment in C# development skills and .NET code bases, and would like to enter into this new, exciting world. This example-oriented guide provides a practical approach to quickly learn the fundamentals of Android app development using C# and Xamarin.Android. It will lead you through building an Android app step-by-step with steadily increasing complexity. Beginning with an overview of the Android and Xamarin platforms to provide you with a solid understanding of the underlying platform, we gradually walk through building and testing a Points of Interest Android app using C# and the Xamarin.Android product. You will learn to create ListView and add detail view to your Android application. You will handle application behaviors on orientation changes, before learning the different techniques to manage resources and layouts to support multiple screen sizes. You will then access a SQLite database in a cross-platform way and add location features to your application. Finally, you will add camera integration to your application and deploy your app to the various Android app stores.
Table of Contents (13 chapters)
close
close
12
Index

Creating SavePOI()


Notice that in the previous step, in the Adding Save and Delete action section, we are calling the SavePOI() and DeletePOI() actions from the OnOptionsItemSelected() method, but we haven't declared them at all. These two methods will deal with consuming web services to create, update, and delete the POI. The following sections will take you through both the SavePOI() and DeletePOI() actions.

Let's now declare a new method SavePOI() in the POIDetailActivity class. The SavePOI() method could avoid placing a lot of logic in the OnOptionsItemSelected() method. This method will validate the user input and initiate the server request to create or update the POI.

We will cover the field validation in an upcoming section and now focus on getting the user data from the screen and initiate a create/update request. The following listing shows what should be present in SavePOI():

protected void SavePOI()
{
    _poi.Name = _nameEditText.Text;
    _poi.Description = _descrEditText.Text...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Xamarin Mobile Application Development for Android, Second Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon