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

Creating a news feed service

In this practical example, we will put together all the knowledge acquired during the first three recipes in order to create a news feed service. This news feed service will first populate a ListView element of news, and then will periodically check if fresh news is available regardless of whether the activity is focused or not.

Getting ready

To follow this recipe, create a new project named NewsFeedService.

How to do it...

  1. Create a layout named Welcome.xml and update it to the following:
    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/feedItemsListView" android:layout_width="fill_parent" ...

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