Exemple #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.HistoryList);
            mListView = FindViewById <ListView>(Resource.Id.mListView);
            history   = new List <string>();
            history.Add("08/07/2017    CBD to Burwood");
            history.Add("21/03/2018    South Yarra to Dandenong");
            MyListViewAdapter adapter = new MyListViewAdapter(this, history);

            mListView.Adapter = adapter;
        }
Exemple #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.TruckList);
            mListView = FindViewById <ListView>(Resource.Id.mListView);
            trucks    = new List <string>();
            trucks.Add("Robin Pierce");
            trucks.Add("Johnny Dale");
            trucks.Add("Allen Schmitt");
            trucks.Add("Nathan Dodson");
            trucks.Add("Steven Ball");
            trucks.Add("George Santos");
            MyListViewAdapter adapter = new MyListViewAdapter(this, trucks);

            mListView.Adapter    = adapter;
            mListView.ItemClick += MListView_ItemClick;
        }