예제 #1
0
            public void OnItemClick(AdapterView parent, View view, int position, long id)
            {
                ImageView  icRightBtn = view.FindViewById <ImageView>(Resource.Id.ivWeClipItem_icRight);
                EventFiles model      = ListOfEventFiles.listOfEventFiles[position];

                if (model.isSelected())
                {
                    if (model.IsVideo)
                    {
                        NoofVideo--;
                    }
                    else
                    {
                        NoofImage--;
                    }

                    model.setSelected(false);
                    icRightBtn.Visibility = ViewStates.Gone;
                }
                else
                {
                    if (model.IsVideo)
                    {
                        NoofVideo++;
                    }
                    else
                    {
                        NoofImage++;
                    }
                    model.setSelected(true);
                    icRightBtn.Visibility = ViewStates.Visible;
                }
                etTitle.Text = NoofVideo + " Videos |" + " " + NoofImage + " Images";
            }
예제 #2
0
            public void OnItemClick(AdapterView parent, View view, int position, long id)
            {
                ImageView  icRightBtn = view.FindViewById <ImageView>(Resource.Id.ivWeClipItem_icRight);
                EventFiles model      = ListOfDefultEventFiles.listOfEventFiles[position];

                if (model.ID != 0)
                {
                    if (model.isSelected())
                    {
                        if (model.IsVideo)
                        {
                            NoofVideo--;
                        }
                        else
                        {
                            NoofImage--;
                        }

                        model.setSelected(false);
                        icRightBtn.Visibility = ViewStates.Gone;
                    }
                    else
                    {
                        if (model.IsVideo)
                        {
                            NoofVideo++;
                        }
                        else
                        {
                            NoofImage++;
                        }
                        model.setSelected(true);
                        icRightBtn.Visibility = ViewStates.Visible;
                    }
                    etTitle.Text = NoofVideo + " Videos |" + " " + NoofImage + " Images";
                }
                else
                {
                    Intent intent = new Intent(context, typeof(AddImageAndVideoForEventActivity));
                    intent.PutExtra("strCapture", model.EventID);
                    intent.PutExtra("strIsDefaultEvent", true);
                    context.StartActivity(intent);
                    context.Finish();
                }
            }