topical media & game development
#mobile-application-12-DerbyNames-MonoAndroid-DerbyNames-MonoAndroid-VixenTab.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
{
public class VixenTab: Fragment
{
public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
base.OnCreateView (inflater, container, savedInstanceState);
var view = inflater.Inflate (Resource.Layout.tab, container, false);
var derbyData = view.FindViewById<ListView> (Resource.Id.DerbyData);
string teamName = "Lansing Derby Vixens";
List<DerbyName> fullDerbyNameData = Network.GetRoster(teamName);
List<string> data = new List<string>();
fullDerbyNameData.ForEach(derbyName => data.Add(derbyName.Name));
derbyData.Adapter = new ArrayAdapter<string> (container.Context, Resource.Layout.list_item, data.ToArray());
return view;
}
}
}
(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.