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

            SetContentView(Resource.Layout.HomeDetail);

            personsView = FindViewById <ListView>(Resource.Id.personListView);

            string retrievedData = Intent.GetStringExtra("homeDetail");

            home = JsonConvert.DeserializeObject <Home>(retrievedData);

            PersonListAdapter personListadapter = new PersonListAdapter(this, home.Persons.ToList());

            personsView.Adapter = personListadapter;

            personsView.ItemClick += PersonsView_ItemClick;
        }
Ejemplo n.º 2
0
        async Task LoadPeople()
        {
            try
            {
                //progressDialog.Show ();
                //progressDialog.SetMessage ("Loading groups and people...");

                //load all groups and people
                var groups = await FaceClient.Shared.LoadGroupsWithPeople();

                var selectedPerson = personListAdapter?.SelectedPerson;

                personListAdapter        = new PersonListAdapter(groups);
                listView_persons.Adapter = personListAdapter;

                if (personListAdapter.Count > 0)
                {
                    if (selectedPerson != null)
                    {
                        personListAdapter.Select(selectedPerson);
                    }
                    else
                    {
                        SetPersonSelected(0);
                    }
                }
                else
                {
                    SetPersonSelected(-1);
                }
            }
            catch (Exception e)
            {
                AddLog(e.Message);
            }

            //progressDialog.Dismiss ();
        }
        protected override void OnResume()
        {
            base.OnResume();

            listView_persons.ItemClick += ListView_Persons_ItemClick;
            listView_faces_0.ItemClick += ListView_Faces_0_ItemClick;
            select_image_0.Click       += Select_Image_0_Click;
            manage_persons.Click       += Manage_Persons_Click;
            verify.Click   += Verify_Click;
            view_log.Click += View_Log_Click;

            mPersonListAdapter       = new PersonListAdapter(this);
            listView_persons.Adapter = mPersonListAdapter;

            if (mPersonListAdapter.personIdList.Count != 0)
            {
                SetPersonSelected(0);
            }
            else
            {
                SetPersonSelected(-1);
            }
        }
Ejemplo n.º 4
0
 private void InitializeAdapter()
 {
     Adapter = new PersonListAdapter(Writer, ErrorWriter);
 }