Book Image

Xamarin Cross-platform Application Development - Second Edition

By : Jonathan Peppers
Book Image

Xamarin Cross-platform Application Development - Second Edition

By: Jonathan Peppers

Overview of this book

<p>Developing a mobile application for just one platform is becoming a thing of the past. Companies expect their apps to be supported on both iOS and Android, while leveraging the best native features on both. Xamarin's tools help ease this problem by giving developers a single toolset to target both platforms.</p> <p>This book is a step-by-step guide to building real-world applications for iOS and Android. The book walks you through building a chat application, complete with a backend web service and native features such as GPS location, camera, and push notifications. Additionally, you'll learn how to use external libraries with Xamarin and Xamarin.Forms to create shared user interfaces and make app-store-ready applications. This second edition has been updated with new screenshots and detailed steps to provide you with a holistic overview of the new features incorporated in Xamarin 3. By the end of the book, you will have gained expertise to build on the concepts learned and effectively develop a market-ready cross-platform application.</p>
Table of Contents (19 chapters)
Xamarin Cross-platform Application Development Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Xamarin's Android designer


The default template for Android projects has a little more built-in functionality than iOS. Android user interface layouts are defined in XML files that are readable by humans and editable. However, Xamarin Studio has provided an excellent design tool that allows you to drag and drop controls to define your Android layouts. Let's add some more features to your application and start using the Android designer.

Return to Xamarin Studio and carry out the following steps to add features to your app:

  1. Open the Android project you created earlier in this chapter in Xamarin Studio.

  2. Navigate to Resources | layout in your project and open Main.axml.

  3. You will see the Android designer open in Xamarin Studio.

  4. Drag TextView from the Toolbox section on the right to the layout just above the button labeled Hello World, Click Me!

  5. Type some default text such as Count: 0 into the label.

  6. In the Properties pane on the right, you'll see the id value is set to @+id/textView1. Let's change...