topical media & game development
#mobile-application-12-DerbyNames-MonoAndroid-DerbyNames-MonoAndroid-LeagueRoster.cs / cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace DerbyNames_MonoAndroid
{
[Activity (Label = "LeagueRoster")]
public class LeagueRoster : ListActivity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
string teamName = Intent.GetStringExtra("TeamName") ?? "Lansing Derby Vixens";
List<DerbyName> fullRosterData = Network.GetRoster(teamName);
List<string> data = new List<string>();
fullRosterData.ForEach(derbyName => data.Add(derbyName.Name));
ListAdapter = new ArrayAdapter<string> (this, Resource.Layout.list_item, data.ToArray());
}
}
}
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.