コード例 #1
0
        public override View GetGroupView(int groupPosition, bool isExpanded, View convertView, ViewGroup parent)
        {
            ExpandedMenuModel headerTitle = listDataHeader[groupPosition];

            convertView = convertView ?? context.LayoutInflater.Inflate(Resource.Layout.ListHeader, null);
            TextView  lblListHeader = (TextView)convertView.FindViewById(Resource.Id.submenu);
            ImageView headerIcon    = (ImageView)convertView.FindViewById(Resource.Id.iconimage);

            lblListHeader.Text = headerTitle.Name;
            headerIcon.SetImageResource(headerTitle.Image);

            return(convertView);
        }
コード例 #2
0
        private void PrepareListData()
        {
            listDataHeader = new List <ExpandedMenuModel>();
            listDataChild  = new Dictionary <ExpandedMenuModel, List <String> >();

            ExpandedMenuModel item1 = new ExpandedMenuModel();

            item1.Name  = "Settings";
            item1.Image = Resource.Drawable.ic_settings_grey_700_18dp;
            // Adding data header
            listDataHeader.Add(item1);

            // Adding child data
            List <String> heading1 = new List <String>();

            heading1.Add("Settings");
            heading1.Add("Timezone");
            heading1.Add("Currency");
            heading1.Add("Edit Profile");
            heading1.Add("Beneficiary(ies)");
            heading1.Add("Setup PIN");
            listDataChild.Add(listDataHeader[0], heading1);// Header, Child data

            ExpandedMenuModel item2 = new ExpandedMenuModel();

            item2.Name  = "Tools";
            item2.Image = Resource.Drawable.ic_devices_grey_700_18dp;
            listDataHeader.Add(item2);

            List <String> heading2 = new List <String>();

            heading2.Add("Portfolio");
            heading2.Add("Share App with friends");
            heading2.Add("Invite friends");
            listDataChild.Add(listDataHeader[1], heading2);

            ExpandedMenuModel item3 = new ExpandedMenuModel();

            item3.Name  = "Backup";
            item3.Image = Resource.Drawable.ic_backup_grey_700_18dp;
            listDataHeader.Add(item3);

            List <String> heading3 = new List <String>();

            heading3.Add("View Pockets");
            heading3.Add("View Wallets");
            heading3.Add("Send/Receive");
            heading3.Add("View private keys");
            heading3.Add("View QR Code");
            listDataChild.Add(listDataHeader[2], heading3);

            ExpandedMenuModel item4 = new ExpandedMenuModel();

            item4.Name  = "Pockets/Wallets";
            item4.Image = Resource.Drawable.ic_shop_two_grey_700_18dp;
            listDataHeader.Add(item4);

            List <String> heading4 = new List <String>();

            heading4.Add("Paper Wallet Printout");
            heading4.Add("Email Wallet");
            heading4.Add("Backing Phrase");
            heading4.Add("Trusted 3rd Partys");
            heading4.Add("Serious Help");
            listDataChild.Add(listDataHeader[3], heading4);

            ExpandedMenuModel item5 = new ExpandedMenuModel();

            item5.Name  = "Help";
            item5.Image = Resource.Drawable.ic_help_grey_700_18dp;
            listDataHeader.Add(item5);

            List <string> heading5 = new List <string>();

            heading5.Add("Support");
            heading5.Add("FAQ");
            listDataChild.Add(listDataHeader[4], heading5);

            ExpandedMenuModel item6 = new ExpandedMenuModel();

            item6.Name  = "About";
            item6.Image = Resource.Drawable.ic_info_grey_700_18dp;
            listDataHeader.Add(item6);

            List <string> heading6 = new List <string>();

            heading6.Add("Website");
            heading6.Add("Version");
            heading6.Add("Support");
            listDataChild.Add(listDataHeader[5], heading6);
        }