Esempio n. 1
0
        private void ExpandableList_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            var itmGroup = lstKeys[e.GroupPosition];
            var itmChild = groupItems[itmGroup][e.ChildPosition];

            Toast.MakeText(this, string.Format("Group {0}: child {1}", itmGroup, itmChild), ToastLength.Long).Show();
        }
Esempio n. 2
0
        private void OnChildClick(object sender, ExpandableListView.ChildClickEventArgs childClickEventArgs)
        {
            var listView = ListView;

            if (listView == null)
            {
                return;
            }

            var newValue =
                ((MvxExpandableListAdapter)listView.ExpandableListAdapter).GetRawItem(
                    childClickEventArgs.GroupPosition, childClickEventArgs.ChildPosition);

            if (!newValue.Equals(_currentValue))
            {
                var pos = listView.GetFlatListPosition(
                    ExpandableListView.GetPackedPositionForChild(
                        childClickEventArgs.GroupPosition,
                        childClickEventArgs.ChildPosition));
                listView.SetItemChecked(pos, true);

                _currentValue = newValue;
                FireValueChanged(newValue);
            }
        }
Esempio n. 3
0
        private void ActivitiesWeek_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            e.Handled = false;

            SetSelectedChildPosition(e.GroupPosition, e.ChildPosition);

            Log.Info(TAG, "ActivitiesWeek_ChildClick: groupPosition - " + e.GroupPosition.ToString() + ", childPosition - " + e.ChildPosition.ToString() + ", ID - " + e.Id.ToString());
        }
        public void ExperienceListChildClick(object sender, ExpandableListView.ChildClickEventArgs args)
        {
            lastExperience = experienceGroups[args.GroupPosition].ArExperiences[args.ChildPosition];

            string[] permissions = (lastExperience.FeaturesMask & Features.Geo) == Features.Geo ?
                                   new string[] { Manifest.Permission.Camera, Manifest.Permission.AccessFineLocation } :
            new string[] { Manifest.Permission.Camera };

            ArchitectView.PermissionManager.CheckPermissions(this, permissions, PermissionManager.WikitudePermissionRequest, this);
            args.Handled = true;
        }
Esempio n. 5
0
 private void ServicesListView_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
 {
     try
     {
         Card clickedCard = serviceis[e.GroupPosition].Services[e.ChildPosition];
         MakeDial(clickedCard);
     }
     catch (Exception ex)
     {
         Log.Error("GetUserSetting", ex.Message);
     }
 }
        private void ListViewGastos_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            var infoGrupo = _listViewGroups[e.GroupPosition];
            var gasto     = infoGrupo.Gastos[e.ChildPosition];
            var intent    = new Intent(this, typeof(EditarGastoActivity));

            intent.PutExtra("Id", gasto.Id);
            intent.PutExtra("Data", infoGrupo.Data.Ticks);
            intent.PutExtra("Estabelecimento", gasto.Estabelecimento.Nome);
            intent.PutExtra("Valor", Convert.ToDouble(gasto.Valor));
            StartActivityForResult(intent, 0);
        }
Esempio n. 7
0
        private void OnChild_Click(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            var keys      = listDataHeader[e.GroupPosition];
            var listValue = listDataChild[keys];
            var child     = listValue[e.ChildPosition].Trim();

            if (child == listValue[4])// not right all
            {
                Intent intent = new Intent(this, typeof(SD));
                this.StartActivity(intent);
            }
        }
        private async void CategoriesListViewOnChildClick(object sender, ExpandableListView.ChildClickEventArgs childClickEventArgs)
        {
            var sampleName = string.Empty;

            try
            {
                // Call a function to clear existing credentials.
                ClearCredentials();

                // Get the clicked item.
                SampleInfo item = (SampleInfo)_filteredSampleCategories[childClickEventArgs.GroupPosition].Items[childClickEventArgs.ChildPosition];

                // Download any offline data before showing the sample.
                if (item.OfflineDataItems != null)
                {
                    // Show the waiting dialog.
                    var builder = new AlertDialog.Builder(this);
                    builder.SetView(new ProgressBar(this)
                    {
                        Indeterminate = true
                    });
                    builder.SetMessage("Downloading data");
                    AlertDialog dialog = builder.Create();
                    dialog.Show();

                    try
                    {
                        // Begin downloading data.
                        await DataManager.EnsureSampleDataPresent(item);
                    }
                    finally
                    {
                        // Hide the progress dialog.
                        dialog.Dismiss();
                    }
                }

                // Each sample is an Activity, so locate it and launch it via an Intent.
                var newActivity = new Intent(this, item.SampleType);

                // Start the activity.
                StartActivity(newActivity);
            }
            catch (Exception ex)
            {
                AlertDialog.Builder bldr = new AlertDialog.Builder(this);
                var dialog = bldr.Create();
                dialog.SetTitle("Unable to load " + sampleName);
                dialog.SetMessage(ex.Message);
                dialog.Show();
            }
        }
Esempio n. 9
0
        private void ExpandableList_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            var parent = sender as ExpandableListView;
            var child  = parent.ExpandableListAdapter.GetChild(e.GroupPosition, e.ChildPosition).ToString();

            View parentView = parent.GetChildAt(e.GroupPosition);

            ISharedPreferences       prefs  = PreferenceManager.GetDefaultSharedPreferences(this);
            ISharedPreferencesEditor editor = prefs.Edit();

            editor.PutString("shared_child", child);
            editor.Apply();
            displaySelectedScreen();

            // StartActivity(typeof(ContentActivity));
        }
Esempio n. 10
0
        private void HandleSelect(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            string value = "";

            value = mAdapter.GetChild(e.GroupPosition, e.ChildPosition).ToString();
            Android.Support.V4.App.Fragment fragment = null;
            Bundle args = new Bundle();

            args.PutString("location", value);
            args.PutString("prevView", "categories");
            fragment           = detailFragment.NewInstance();
            fragment.Arguments = args;
            base.FragmentManager.BeginTransaction()
            .Replace(Resource.Id.content_frame, fragment)
            .Commit();
        }
Esempio n. 11
0
        private void ExpandableListView_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            string[] title = new string[] { "chest", "shoulder", "back", "triceps", "biceps", "legs" };

            Intent intent = new Intent(this, typeof(ExercisePage));

            intent.PutExtra("MyData", (string)listAdapter.GetChild(e.GroupPosition, e.ChildPosition));
            intent.PutExtra("Name", title[(int)listAdapter.GetGroupId(e.GroupPosition)]);
            intent.PutExtra("TrainingId", trainingId);
            intent.PutExtra("ViewModel", 1);
            if (modelView == 2)
            {
                intent.PutExtra("ViewModel2", 2);
            }
            StartActivity(intent);
        }
Esempio n. 12
0
        private void expandableListView_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            InstructionNotificationDialog.Hide();

            var childSelected = (InstructionGroupedListObject)e.Parent.ExpandableListAdapter.GetChild(e.GroupPosition, e.ChildPosition);

            childSelected.Instructions[e.ChildPosition].OpenMessageModal((result) =>
            {
                if (result)
                {
                    var childList = (InstructionGroupedListObject)e.Parent.ExpandableListAdapter.GetChild(e.GroupPosition, e.ChildPosition);
                    var child     = childList.Instructions[e.ChildPosition];
                    child.MobileData.ProgressState = InstructionProgress.Complete;

                    CurrentPopInstructions.Remove(child);
                }

                InstructionNotificationDialog.Show();
            });
        }
Esempio n. 13
0
        private async void ContractsList_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            var contract = countries[e.GroupPosition].Contracts[e.ChildPosition];

            if (contract.Downloading)
            {
                return;
            }
            var progressBar = e.ClickedView.FindViewById <ProgressBar>(Resource.Id.ProgressBar);

            // Show the progress bar
            if (!contract.Downloaded)
            {
                progressBar.Visibility = ViewStates.Visible;
            }

            ///ViewModel.ContractTappedCommand.Execute(contract);
            await ViewModel.AddOrRemoveContract(contract);

            //(ContractsList.Adapter as CountryListAdapter).GetChildView(e.GroupPosition)
            //_countries[groupPosition].Contracts[childPosition].

            progressBar.Visibility = ViewStates.Gone;
            var checkBox = e.ClickedView.FindViewById <CheckBox>(Resource.Id.ContractCheckBox);

            checkBox.Checked = contract.Downloaded;

            var stationQuantity = e.ClickedView.FindViewById <TextView>(Resource.Id.StationQuantity);

            stationQuantity.Text       = contract.StationCounterStr;
            stationQuantity.Visibility = contract.Downloaded ? ViewStates.Visible : ViewStates.Gone;


            //e.ClickedView.SetBackgroundColor(Color.ParseColor("#676767"));
            //var checkBox = e.ClickedView.FindViewById<CheckBox>(Resource.Id.ContractCheckBox);

            //checkBox.SetBinding(
            //     () => contract.Downloaded,
            //     () => checkBox.Checked);
        }
        private void ExpandableListView_ChildClick1(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            Toast.MakeText(this, "Clicked :" + mAdapter.GetChild(e.GroupPosition, e.ChildPosition), ToastLength.Short).Show();
            Toast.MakeText(this, "Clicked :" + mAdapter.GetGroup(e.GroupPosition), ToastLength.Short).Show();

            //onoma tou paidiou
            Object NameOfChild = mAdapter.GetChild(e.GroupPosition, e.ChildPosition);

            //onoma tou patera
            Object NameOfFather = mAdapter.GetGroup(e.GroupPosition);

            for (int i = 0; i < VISIT2.Count; i++)
            {
                string CreatedName = "Visit " + i.ToString() + "   " + "Date :" + VISIT2[i].Date.ToString();
                if (CreatedName == NameOfFather.ToString())
                {
                    SpecVisitId = VISIT2[i].VisitID;
                }
                string details_visitID1 = "@ Diagnosis VisitID :" + VISIT2[i].VisitID;

                int PositionOfFather = e.GroupPosition;
                int PositionOfSon    = e.ChildPosition;
            }

            if (NameOfChild.ToString() == " Diagnosis ")
            {
                var activity1 = new Intent(this, typeof(DiagnosisListViewActivity));
                activity1.PutExtra("MyData", NameOfFather.ToString());
                activity1.PutExtra("VisitID", SpecVisitId);
                StartActivity(activity1);
            }
            if (NameOfChild.ToString() == " Medicines ")
            {
                var activity1 = new Intent(this, typeof(MedicinesListViewActivity));
                activity1.PutExtra("MyData", NameOfFather.ToString());
                activity1.PutExtra("VisitID", SpecVisitId);
                StartActivity(activity1);
            }
        }
Esempio n. 15
0
 void ExpListView_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
 {
 }
Esempio n. 16
0
 private void ExpandableListView_ChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
 {
     Toast.MakeText(this, "Clicked :" + mAdapter.GetChild(e.GroupPosition, e.ChildPosition), ToastLength.Short).Show();
     Toast.MakeText(this, "Clicked :" + mAdapter.GetGroup(e.GroupPosition), ToastLength.Short).Show();
 }
 private void OnChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
 {
     Element.OnBusArrivalClickedFunc(e.GroupPosition, e.ChildPosition);
 }
Esempio n. 18
0
        private void OnSubcategoryClickHandler(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            var intent = new Intent(this, typeof(ProductListPageActivity));

            StartActivity(intent);
        }
Esempio n. 19
0
 private void listview_ChildClick(object sender, ExpandableListView.ChildClickEventArgs args)
 {
     Toast.MakeText(Activity, "Group: " + args.GroupPosition + " Child: " + args.ChildPosition + " Clicked", ToastLength.Short).Show();
 }
        private void ExpandableListViewChildClick(object sender, ExpandableListView.ChildClickEventArgs e)
        {
            Intent intent = new Intent(BaseContext, nodes.ElementAt(e.GroupPosition).Child.ElementAt(e.ChildPosition).ClassType);

            StartActivity(intent);
        }