Esempio n. 1
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            InflaterMain = inflater;
            View view = inflater.Inflate(Resource.Layout.landing_page, container, false);


            var items = new List <SpinnerItem>();

            for (int i = 0; i < 30; i++)
            {
                items.Add(new SpinnerItem {
                    Id = i, Name = "Item " + i
                });
            }
            SpnTest = view.FindViewById <SpinnerSearch>(Resource.Id.spnTest);
            SpnTest.SpinnerTitle = "Selecione Um Item";
            SpnTest.SetItems(items, -1, null);

            var items2 = new List <SpinnerItem>();

            for (int i = 0; i < 30; i++)
            {
                items2.Add(new SpinnerItem {
                    Id = i, Name = "Item " + i
                });
            }
            SpnMultiTest = view.FindViewById <MultiSpinnerSearch>(Resource.Id.spnMultTest);
            SpnMultiTest.SpinnerTitle = "Selecione";
            SpnMultiTest.SetItems(items2, null);

            return(view);
        }
Esempio n. 2
0
        void fillFabList()
        {
            Task.Run(async() => {
                SpnTest.Enabled = false;
                string url      = "https://webapps.npcc.ae/ApplicationWebServices/api/paperless/GetFabricatorsList?iStationId=" + _spl.iStationId;
                lstFabUsers     = await npcc_services.inf_CallWebServiceAsync <List <inf_userinfo>, string>(inf_method.Get, url);
            }).ContinueWith(fn => {
                if (lstFabUsers != null)
                {
                    act.RunOnUiThread(() => {
                        var items = new List <SpinnerItem>();
                        foreach (inf_userinfo fabUser in lstFabUsers)
                        {
                            items.Add(new SpinnerItem {
                                Name = fabUser.cFullName, Item = fabUser
                            });
                        }

                        SpnTest.SpinnerTitle = "Select user from the list";
                        SpnTest.SetItems(items, -1, null);
                        SpnTest.Enabled = true;
                    });
                }
            });
        }