Exemplo n.º 1
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);
            }
        }
Exemplo n.º 2
0
        protected override void SetValueImpl(object target, object value)
        {
            var listView = (MvxExpandableListView)target;

            if (value == null)
            {
                _currentValue = null;
                listView.ClearChoices();
                return;
            }
            var positions = ((MvxExpandableListAdapter)listView.ExpandableListAdapter).GetPositions(value);

            if (positions == null)
            {
                MvxBindingLog.Warning("Value not found for spinner {0}", value.ToString());
                return;
            }

            _currentValue = value;
            listView.SetSelectedChild(positions.Item1, positions.Item2, true);

            var pos =
                listView.GetFlatListPosition(ExpandableListView.GetPackedPositionForChild(positions.Item1,
                                                                                          positions.Item2));

            listView.SetItemChecked(pos, true);
        }
Exemplo n.º 3
0
        public override View GetGroupView(int groupPosition, bool isExpanded, View convertView, ViewGroup parent)
        {
            ExpandableListView mExpandableListView = (ExpandableListView)parent;

            mExpandableListView.ExpandGroup(groupPosition);
            HeaderViewHolder headerViewHolder;
            var user = GetGroup(groupPosition).Cast2 <UserCompany>();

            if (convertView == null)
            {
                LayoutInflater layoutInflater = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService);
                convertView = layoutInflater.Inflate(Resource.Layout.activity_user_list_item_header, null);

                headerViewHolder = new HeaderViewHolder();
                headerViewHolder.txtCompanyName = (TextView)convertView.FindViewById(Resource.Id.userListCompanyName);

                convertView.Tag = headerViewHolder;
            }
            else
            {
                headerViewHolder = (HeaderViewHolder)convertView.Tag;
            }

            headerViewHolder.txtCompanyName.Typeface = Typeface.DefaultBold;
            headerViewHolder.txtCompanyName.Text     = user.CompanyName;

            return(convertView);
        }
Exemplo n.º 4
0
 public ExpandableListAdapter(Activity context, List <ExpandedMenuModel> listDataHeader, Dictionary <ExpandedMenuModel, List <string> > listChildData, ExpandableListView mView)
 {
     _context        = context;
     _listDataHeader = listDataHeader;
     _listDataChild  = listChildData;
     expandList      = mView;
 }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Checklist);

            InitializeActionBar(SupportActionBar);

            ActionBarTitle.Text = "Totemisatie checklist";

            sharedPrefs = GetSharedPreferences("checklist", FileCreationMode.Private);
            var ser = sharedPrefs.GetString("states", "empty");
            List <List <bool> > states;

            if (!ser.Equals("empty"))
            {
                states = JsonSerializer.DeserializeFromString <List <List <bool> > >(ser);
            }
            else
            {
                states = null;
            }

            expand = FindViewById <ExpandableListView>(Resource.Id.expand);

            InitializeExpandableListView();
            expandAdapater = new ExpendListAdapter(this, dictGroup, states);
            expand.SetAdapter(expandAdapater);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.sample_chooser_activity);
            sampleAdapter = new SampleAdapter(this);
            ExpandableListView sampleListView = (ExpandableListView)FindViewById(Resource.Id.sample_list);

            sampleListView.SetAdapter(sampleAdapter);
            sampleListView.SetOnChildClickListener(this);

            Intent intent  = Intent;
            string dataUri = intent.DataString;

            string[] uris;
            if (dataUri != null)
            {
                uris = new string[] { dataUri };
            }
            else
            {
                List <string> uriList      = new List <string>();
                AssetManager  assetManager = Assets;
                try
                {
                    foreach (string asset in assetManager.List(""))
                    {
                        if (asset.EndsWith(".exolist.json"))
                        {
                            uriList.Add("asset:///" + asset);
                        }
                    }
                }
                catch (Java.IO.IOException e)
                {
                    Toast.MakeText(ApplicationContext, Resource.String.sample_list_load_error, ToastLength.Long).Show();
                }

                uriList.Sort();
                uris = uriList.ToArray();
            }

            downloadTracker = ((DemoApplication)Application).GetDownloadTracker();
            SampleListLoader loaderTask = new SampleListLoader(this);

            loaderTask.Execute(uris);

            // Start the download service if it should be running but it's not currently.
            // Starting the service in the foreground causes notification flicker if there is no scheduled
            // action. Starting it in the background throws an exception if the app is in the background too
            // (e.g. if device screen is locked).
            try
            {
                Offline.DownloadService.Start(this, Java.Lang.Class.FromType(typeof(DemoDownloadService)));
            }
            catch (IllegalStateException e)
            {
                Offline.DownloadService.StartForeground(this, Java.Lang.Class.FromType(typeof(DemoDownloadService)));
            }
        }
        public ExpandableContentELVAdapter(ExpandableListView list, int actionViewId, int titleLayout, int contentLayout) : base(list)
        {
            __actionViewId  = actionViewId;
            __titleLayout   = titleLayout;
            __contentLayout = contentLayout;

            expansionLimit = NO_LIMIT;
        }
Exemplo n.º 8
0
 public ProductsItemListAdapter(SupportFragment supportFragment, List <ParentProductsModel> listDataHeader,
                                Dictionary <int, List <ProductsModel> > listChildData, ExpandableListView expadableListview)
 {
     _supportFragment    = supportFragment;
     _listDataHeader     = listDataHeader;
     _listDataChild      = listChildData;
     _expandableListView = expadableListview;
 }
Exemplo n.º 9
0
 public CollapseAnimationListener(AnimatedExpandableListAdapter adapter, int groupPosition, ExpandableListView listView, GroupInfo info, DummyView dummyView)
 {
     _adapter       = adapter;
     _groupPosition = groupPosition;
     _listView      = listView;
     _info          = info;
     _dummyView     = dummyView;
 }
Exemplo n.º 10
0
 private void FnSetUpControls(LayoutInflater inflater)
 {
     toolbar = thisFragmentView.FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbarSearchProducts);
     //inflate search to toolbar
     inactiveSearchView = inflater.Inflate(Resource.Layout.checkout_fragment_search_inactive, toolbar, false);
     activeSearchView   = inflater.Inflate(Resource.Layout.checkout_fragment_search_active, toolbar, false);
     lvCartItemList     = thisFragmentView.FindViewById <ExpandableListView>(Resource.Id.lvProductList);
 }
        private void SetAttacksView()
        {
            var attacksView = viewFlipper.CurrentView;

            myAttackList = attacksView.FindViewById <ExpandableListView>(Resource.Id.attacksList);
            myAttackList.SetAdapter(new AttackListAdapter(myViewModel.Attacks, Activity));
            myAttackList.ItemClick += MyAttackList_ItemClick;
        }
Exemplo n.º 12
0
 public ExpandableMenuAdapter(Context context, JavaList <IDictionary <string, object> > groupData, int groupLayout,
                              string[] groupFrom, int[] groupTo, JavaList <IList <IDictionary <string, object> > > childData, int childLayout, string[] childFrom, int[] childTo, ExpandableListView listView) : base(context, groupData, groupLayout, groupFrom, groupTo, childData, childLayout, childFrom, childTo)
 {
     this.context    = context;
     this._groupData = new JavaList <IDictionary <string, object> >(groupData);
     this._childData = new JavaList <IList <IDictionary <string, object> > >(childData);
     this.listView   = listView;
 }
Exemplo n.º 13
0
 public ExpandableAnimationListener(AnimatedExpandableListAdapter adaptor, int state, int groupPosition, DummyView dummyView, ExpandableListView listView, GroupInfo info)
 {
     this.adaptor       = adaptor;
     this.state         = state;
     this.groupPosition = groupPosition;
     this.dummyView     = dummyView;
     this.listView      = listView;
     this.info          = info;
 }
Exemplo n.º 14
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ShowHamburgerMenu = true;
            ((MainMenuView)Activity).Title = "Pier";
            View view = base.OnCreateView(inflater, container, savedInstanceState);

            expListView = view.FindViewById <ExpandableListView>(Resource.Id.lvPierLocation);
            return(view);
        }
Exemplo n.º 15
0
        private async Task ShowSavedSongs()
        {
            //initialize UI variables
            ExpandableListView savedList           = FindViewById <ExpandableListView>(Resource.Id.savedList);
            ListView           savedListNonGrouped = FindViewById <ListView>(Resource.Id.savedListNonGrouped);
            ProgressBar        progressBar         = FindViewById <ProgressBar>(Resource.Id.progressBar);

            //--UI--

            progressBar.Visibility = ViewStates.Visible;

            string path = Path.Combine(ApplicationPath, SavedLyricsLocation);

            await MiscTools.CheckAndCreateAppFolders();

            Log(Type.Info, $"Saved lyrics location is '{path}'");

            List <SongBundle> songList = await Database.GetSongList();

            if (songList != null)
            {
                await GetSavedList(songList);

                allSongs    = new List <SongBundle>();
                artistSongs = new Dictionary <Artist, List <SongBundle> >();

                foreach (Artist a in artistList)
                {
                    artistSongs.Add(a, a.Songs);

                    foreach (SongBundle s in a.Songs)
                    {
                        allSongs.Add(s);
                    }
                }

                Log(Type.Processing, "Set up adapter data");

                if (nonGrouped)
                {
                    savedListNonGrouped.Adapter = new SavedLyricsAdapter(this, allSongs);
                    Log(Type.Info, "Showing adapter for non grouped view");
                    progressBar.Visibility = ViewStates.Gone;
                }
                else
                {
                    savedList.SetAdapter(new ExpandableListAdapter(this, artistList, artistSongs));
                    Log(Type.Info, "Showing adapter for grouped view");
                    progressBar.Visibility = ViewStates.Gone;
                }
            }
            else
            {
                Log(Type.Info, "No files found!");
                progressBar.Visibility = ViewStates.Gone;
            }
        }
Exemplo n.º 16
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View v = inflater.Inflate(Resource.Layout.categoriesLayout, null);
            ExpandableListView ex = (ExpandableListView)v.FindViewById(Resource.Id.expandableListView1);

            ex.SetAdapter(mAdapter);
            ex.ChildClick += HandleSelect;
            return(v);
        }
Exemplo n.º 17
0
        public bool OnChildClick(/* final */ ExpandableListView pParent, /* final */ View pV, /* final */ int pGroupPosition, /* final */ int pChildPosition, /* final */ long pId)
        {
            /* final */
            Example example = (Example)this.mExpandableExampleLauncherListAdapter.GetChild(pGroupPosition, pChildPosition);

            this.StartActivity(new Intent(this, example.ExampleType));

            return(base.OnChildClick(pParent, pV, pGroupPosition, pChildPosition, pId));
        }
Exemplo n.º 18
0
 public bool OnChildClick(ExpandableListView parent, View clickedView,
                          int groupPosition, int childPosition, long id)
 {
     ShowScreen(groupPosition, childPosition);
     mAdapter.selectedGroupPosition = groupPosition;
     mAdapter.selectedChildPosition = childPosition;
     mAdapter.NotifyDataSetChanged();
     return(false);
 }
Exemplo n.º 19
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);

            MobileAds.Initialize(this, "ca-app-pub-5131184764831509~8873327557");
            ShowBannerAd();
            ISharedPreferences       prefs  = PreferenceManager.GetDefaultSharedPreferences(this);
            ISharedPreferencesEditor editor = prefs.Edit();

            day    = DataProvider.getdayInfo(this);
            length = day.Length - 1;

            mButton        = FindViewById <Button>(Resource.Id.button1);
            mButton.Click += (sender, e) =>
            {
                editor.Clear();
                editor.Apply();

                Intent I = new Intent(this, typeof(MainActivity));
                StartActivity(I);
                Finish();
            };
            DatePickerChangeHandler datePickerChangeHandler = new DatePickerChangeHandler(this);

            DP    = FindViewById <DatePicker>(Resource.Id.datePicker1);
            DTNow = DateTime.Now;
            DP.Init(DTNow.Year, DTNow.Month - 1, DTNow.Day, datePickerChangeHandler);


            IndexofDay = DTNow.Month == 9 ? (DTNow.Day - 1) % length : DTNow.Month == 10 ? (DTNow.Day + 1) % length : DTNow.Month == 11 ? (DTNow.Day + 4) % length : DTNow.Month == 12 ? (DTNow.Day + 6) % length : length;


            myHeader = DataProvider.getInfo(this);
            myChild  = new List <string>();
            myChild.Add(day[IndexofDay]);
            mExListView = FindViewById <ExpandableListView>(Resource.Id.EListView);
            adapter     = new EListViewAdapter(this, myHeader, myChild);
            mExListView.SetAdapter(adapter);
            mExListView.ExpandGroup(0);


            mExListView.ChildClick += (sender, e) =>
            {
                if (prefs.Contains("QKG 3") || prefs.Contains("QKG 4"))
                {
                    ChildData = DataProvider.getChildInfo(myHeader[day[IndexofDay]][e.ChildPosition], day[IndexofDay], this);
                }
                else
                {
                    ChildData = DataProvider.getChildInfo(myHeader[day[IndexofDay]][e.ChildPosition], this);
                }
                RegisterForContextMenu(mExListView);
                OpenContextMenu(mExListView);
            };
        }
Exemplo n.º 20
0
        private void CreateHamburgerMenu()
        {
            drawerLayout          = FindViewById <Android.Support.V4.Widget.DrawerLayout>(Resource.Id.drawer_layout);
            actionBarDrawerToggle = new ActionBarDrawerToggle(this, drawerLayout,
                                                              Resource.String.NavigationDrawerOpen, Resource.String.NavigationDrawerClose);

            actionBarDrawerToggle.SyncState();

            ExpandableListView expandableList = FindViewById <ExpandableListView>(Resource.Id.navigationmenu);
            //setup navigation view
            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.NavigationItemSelected += (sender, e) =>
            {
                var menuItem = e.MenuItem;

                int id = menuItem.ItemId;

                menuItem.SetChecked(!menuItem.IsChecked);
                drawerLayout.CloseDrawers();
            };

            PrepareListData();

            menuAdapter = new ExpandableListAdapter(this, listDataHeader, listDataChild, expandableList);

            expandableList.SetAdapter(menuAdapter);

            expandableList.ChildClick += delegate(object sender, ExpandableListView.ChildClickEventArgs e)
            {
                drawerLayout.CloseDrawers();

                List <string> ls = listDataChild[listDataHeader[e.GroupPosition]];

                string menuClicked = ls[(int)e.Id];

                if (menuClicked == "Settings")
                {
                }
                else if (menuClicked == "Edit Profile")
                {
                    Dialogs.UserAlertDialog.ShowDialog(this, LayoutInflater);
                }
                else if (menuClicked == "Beneficiary(ies)")
                {
                    SignatureRecoveryActivity.FirstTimeUse = false;
                    SignatureRecoveryActivity.WalletName   = "";

                    StartActivity(new Intent(Application.Context, typeof(SignatureRecoveryActivity)));
                }
                else
                {
                    Toast.MakeText(this, "child clicked : " + ls[(int)e.Id], ToastLength.Short).Show();
                }
            };
        }
Exemplo n.º 21
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Main);
            expandableList = FindViewById <ExpandableListView> (Resource.Id.expandableListView);

            CreateExpendableListData();
            expandableList.SetAdapter(new ExpandableListAdapter(this, groupItems));
            expandableList.ChildClick += ExpandableList_ChildClick;
        }
 /// <summary>
 /// Updates the group row view.
 /// </summary>
 /// <param name="groupPosition"></param>
 private void UpdateGroup(int groupPosition)
 {
     if (groupPosition >= 0 && groupPosition < GroupCount)
     {
         int  flatPosition = list.GetFlatListPosition(ExpandableListView.GetPackedPositionForGroup(groupPosition));
         int  first        = list.FirstVisiblePosition;
         View convert      = list.GetChildAt(flatPosition - first);
         GetGroupView(groupPosition, list.IsGroupExpanded(groupPosition), convert, list);
     }
 }
Exemplo n.º 23
0
        public bool OnChildClick(ExpandableListView parent, View clickedView, int groupPosition, int childPosition, long id)
        {
            if (this.ListData[groupPosition].children[childPosition] != null)
            {
                parent.CollapseGroup(groupPosition);
                OnBackPressed();
            }

            return(false);
        }
Exemplo n.º 24
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     SetContentView(Resource.Layout.Main);
     newDataList = Data.SampleData();
     myadapter   = new ExpandableDataAdapter(this, newDataList);
     listView    = FindViewById <ExpandableListView> (Resource.Id.myExpandableListview);
     listView.SetAdapter(myadapter);
     listView.SetOnChildClickListener(this);
 }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.CategoriesList);

            try
            {
                // Initialize the SampleManager and create the Sample Categories.
                SampleManager.Current.Initialize();
                _sampleCategories = SampleManager.Current.FullTree.Items.OfType <SearchableTreeNode>().ToList();

                // Remove AR category if device does not support AR.
                try
                {
                    var arSession = new Session(this);
                    _arCompatible = true;
                }
                catch (UnavailableException ex)
                {
                    Console.WriteLine(ex.Message);
                    _arCompatible = false;
                }

                if (!_arCompatible)
                {
                    _sampleCategories.RemoveAll(category => category.Name == "Augmented reality");
                }

                _filteredSampleCategories = _sampleCategories;

                // Set up the custom ArrayAdapter for displaying the Categories.
                var categoriesAdapter = new CategoriesAdapter(this, _sampleCategories);
                _categoriesListView = FindViewById <ExpandableListView>(Resource.Id.categoriesListView);
                _categoriesListView.SetAdapter(categoriesAdapter);
                _categoriesListView.ChildClick   += CategoriesListViewOnChildClick;
                _categoriesListView.DividerHeight = 2;
                _categoriesListView.SetGroupIndicator(null);

                // Set up the search filtering.
                SearchView searchBox = FindViewById <SearchView>(Resource.Id.categorySearchView);
                searchBox.QueryTextChange += SearchBoxOnQueryTextChange;

                // Add a button that brings up settings.
                Button settingsButton = FindViewById <Button>(Resource.Id.settingsButton);
                settingsButton.Click += (s, e) => PromptForKey();

                // Check the existing API key for validity.
                _ = CheckApiKey();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        private async void ExecuteStatisticsQuery(object sender, EventArgs e)
        {
            // Verify that there is at least one statistic definition
            if (!_statisticDefinitions.Any())
            {
                // Warn the user to define a statistic to query
                ShowMessage("Please define at least one statistic for the query.", "Statistical Query");
                return;
            }

            // Create the statistics query parameters, pass in the list of statistic definitions
            StatisticsQueryParameters statQueryParams = new StatisticsQueryParameters(_statisticDefinitions);

            // Specify the selected group fields (if any)
            if (_groupByFields != null)
            {
                // Find fields in the dictionary with a 'true' value and add them to the group by field names
                foreach (KeyValuePair <string, bool> groupField in _groupByFields.Where(field => field.Value))
                {
                    statQueryParams.GroupByFieldNames.Add(groupField.Key);
                }
            }

            // Specify the fields to order by (if any)
            if (_orderByFields != null)
            {
                foreach (OrderFieldOption orderBy in _orderByFields)
                {
                    statQueryParams.OrderByFields.Add(orderBy.OrderInfo);
                }
            }

            // Ignore counties with missing data
            statQueryParams.WhereClause = "\"State\" IS NOT NULL";

            // Execute the statistical query with these parameters and await the results
            StatisticsQueryResult statQueryResult = await _usStatesTable.QueryStatisticsAsync(statQueryParams);

            // Get results formatted as a dictionary (group names and their associated dictionary of results)
            Dictionary <string, IReadOnlyDictionary <string, object> > resultsLookup = statQueryResult.ToDictionary(r => string.Join(", ", r.Group.Values), r => r.Statistics);

            // Create an instance of a custom list adapter that has logic to show results as expandable groups
            ExpandableResultsListAdapter expandableListAdapter = new ExpandableResultsListAdapter(this, resultsLookup);

            // Create an expandable list view and assign the expandable adapter
            ExpandableListView expandableResultsListView = new ExpandableListView(this);

            expandableResultsListView.SetAdapter(expandableListAdapter);

            // Show the expandable list view in a dialog
            AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
            dialogBuilder.SetView(expandableResultsListView);
            dialogBuilder.Show();
        }
 public override bool onGroupClick(ExpandableListView parent, View v, int groupPosition, long id)
 {
     switch (groupPosition)
     {
     case 0:
     case 1:
     case 3:
         return(onClickListener.onClick(groupPosition, 0));
     }
     return(false);
 }
Exemplo n.º 28
0
        public override bool OnContextItemSelected(IMenuItem item)
        {
            ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo)item.MenuInfo;
            int groupPosition = ExpandableListView.GetPackedPositionGroup(info.PackedPosition);

            if (item.ItemId == Resource.Id.Disconnect)
            {
                MainActivity.DisconnectDevice(MainActivity.AvaliableDevicesList.ElementAt(groupPosition).EndPoint);
            }
            return(base.OnContextItemSelected(item));
        }
 /// <summary>
 /// Updates the child row view.
 /// </summary>
 /// <param name="groupPosition"></param>
 /// <param name="childPosition"></param>
 private void UpdateChild(int groupPosition, int childPosition)
 {
     if ((groupPosition >= 0 && groupPosition < GroupCount) &&
         (childPosition >= 0 && childPosition < GetChildrenCount(groupPosition)))
     {
         int  flatPosition = list.GetFlatListPosition(ExpandableListView.GetPackedPositionForChild(groupPosition, childPosition));
         int  first        = list.FirstVisiblePosition;
         View convert      = list.GetChildAt(flatPosition - first);
         GetChildView(groupPosition, childPosition, list.IsGroupExpanded(childPosition), convert, list);
     }
 }
Exemplo n.º 30
0
 public ObservableGroupAdapter(
     ObservableKeyGroupsCollection <TKey, TValue> items,
     ExpandableListView parent,
     Func <int, int, bool, View, ViewGroup, TValue, View> getChildViewFunc,
     Func <int, bool, View, ViewGroup, TKey, View> getGroupViewFunc)
 {
     _dataSource       = items;
     _parent           = WeakReferenceEx.Create(parent);
     _getChildViewFunc = getChildViewFunc;
     _getGroupViewFunc = getGroupViewFunc;
     _subscription     = new NotifyCollectionChangedEventSubscription(_dataSource, OnCollectionChanged);
 }
		public override bool onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id)
		{
			if (groupPosition == 2)
			{
				switch (childPosition)
				{
				case 0:
				case 1:
				case 2:
				case 3:
				case 4:
				case 5:
					return onClickListener.onClick(groupPosition, childPosition);
				}
			}
			return false;
		}
		public override bool onGroupClick(ExpandableListView parent, View v, int groupPosition, long id)
		{
			switch (groupPosition)
			{
			case 0:
			case 1:
			case 3:
				return onClickListener.onClick(groupPosition, 0);
			}
			return false;
		}
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState)
		public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			View view = inflater.inflate(R.layout.fragment_device_category_list, container, false);

			IList<IDictionary<string, string>> groupData = new List<IDictionary<string, string>>();
			IList<IList<IDictionary<string, string>>> childData = new List<IList<IDictionary<string, string>>>();

			string[] deviceCategory = Resources.getStringArray(R.array.device_categories);
			string[] posPrinterChildren = Resources.getStringArray(R.array.pos_printer_children);

			for (int i = 0; i < deviceCategory.Length; i++)
			{
				IDictionary<string, string> groupMap = new Dictionary<string, string>();
				groupData.Add(groupMap);
				groupMap[KEY_TITLE] = deviceCategory[i];
				groupMap[KEY_SUBTITLE] = "";

				if (deviceCategory[i].Equals(getString([email protected]_printer)))
				{
					IList<IDictionary<string, string>> children = new List<IDictionary<string, string>>();

					for (int j = 0; j < posPrinterChildren.Length; j++)
					{
						IDictionary<string, string> childMap = new Dictionary<string, string>();
						children.Add(childMap);
						childMap[KEY_TITLE] = posPrinterChildren[j];
						childMap[KEY_SUBTITLE] = "";
					}
					childData.Add(children);
				}
				else
				{
					IList<IDictionary<string, string>> children = new List<IDictionary<string, string>>();
					childData.Add(children);
				}
			}

			string[] from = new string[] {KEY_TITLE, KEY_SUBTITLE};
			int[] to = new int[] {android.R.id.text1, android.R.id.text2};
			ExpandableListAdapter adapter = new SimpleExpandableListAdapter(Activity, groupData, android.R.layout.simple_expandable_list_item_1, from, to, childData, android.R.layout.simple_expandable_list_item_2, from, to);

			expandableListView = (ExpandableListView) view;
			expandableListView.OnGroupClickListener = this;
			expandableListView.OnChildClickListener = this;
			expandableListView.Adapter = adapter;

			return view;
		}