Ejemplo n.º 1
0
        private void setAdapter()
        {
            loading.Visibility = ViewStates.Gone;

            if (((StatusShare)this.Activity).shareList == null || ((StatusShare)this.Activity).shareList.Length == 0)
            {
                empty.Visibility = ViewStates.Visible;
            }
            else
            {
                this.adapter         = new UpdateAdapter(this.Activity, ((StatusShare)this.Activity).shareList, this.Activity.LayoutInflater);
                this.list.Adapter    = this.adapter;
                this.list.ItemClick += (object sender, AdapterView.ItemClickEventArgs e) => {
                    ((StatusShare)this.Activity).ReplaceFragment(UpdateDetailsFragment.newInstance((StatusShare)this.Activity, e.Position), true);
                };

//				for (int i = 0; i < adapter.Count; i++){
//					adapter.GetItem (i).loadThumbnail (this.Activity, KinveyService.getClient (), adapter);
//				}

                foreach (UpdateEntity update in  ((StatusShare)this.Activity).shareList)
                {
                    update.loadThumbnail(this.Activity, KinveyService.getClient(), adapter);
                }
            }
        }
        public static UpdateDetailsFragment newInstance(StatusShare activity, int position)
        {
            UpdateDetailsFragment ret = new UpdateDetailsFragment();

            ret.entity = activity.shareList [position];

            return(ret);
        }