public override Android.Views.View GetView(int position,
                                                   Android.Views.View reusableView,
                                                   Android.Views.ViewGroup parent)
        {
            if (reusableView == null)
            {
                var inflater = LayoutInflater.From(parent.Context);

                reusableView = inflater.Inflate(Resource.Layout.ItemLayout,
                                                parent,
                                                false);
            }

            CancionModel song = (CancionModel)this.GetItem(position);

            TextView tvTitle    = (TextView)reusableView.FindViewById(Resource.Id.tvTitle);
            TextView tvSubTitle = reusableView.FindViewById(Resource.Id.tvSubtitle)
                                  as TextView;

            tvTitle.Text = song.Title;

            tvSubTitle.Text = song.Subtitle;

            return(reusableView);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            this.SetContentView(Resource.Layout.GridViewLayout);

            GridView grid = this.FindViewById(Resource.Id.gvCuadricula)
                            as GridView;

            var lista = this.generateDummy(50);

            grid.Adapter = new ListViewAdapter(lista);

            grid.ItemClick += (sender, e) => {
                var gGrid = sender as GridView;

                CancionModel song =
                    (CancionModel)gGrid.Adapter.GetItem(e.Position);

                Toast.MakeText(this,
                               "Presionó: " + song,
                               ToastLength.Short).Show();
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            ListView lvLista = this.FindViewById(Resource.Id.lvLista)
                               as ListView;

            var             lista   = this.generateDummy(20);
            ListViewAdapter adapter = new ListViewAdapter(lista);

            lvLista.Adapter = adapter;

            lvLista.ItemClick +=
                (object sender,
                 AdapterView.ItemClickEventArgs e) => {
                ListView lv = sender as ListView;

                ListViewAdapter adapt = (ListViewAdapter)lv.Adapter;

                CancionModel song = (CancionModel)adapt.GetItem(e.Position);

                System.Diagnostics.
                Debug.WriteLine("Presionó: " + song);
            };
        }
        private IList <CancionModel> generateDummy(int count)
        {
            IList <CancionModel> lista = new List <CancionModel>();

            for (int i = 0; i < count; i = i + 1)
            {
                CancionModel song = new CancionModel();

                song.Title    = "Title " + i;
                song.Subtitle = "Subtitle " + i;

                lista.Add(song);
            }

            return(lista);
        }