Esempio n. 1
0
 protected override void OnElementChanged(ElementChangedEventArgs <Controls.Combobox> e)
 {
     base.OnElementChanged(e);
     if (e.OldElement == null)
     {
         var spinner = new Android.Widget.Spinner(base.Context);
         spinner.Prompt = base.Element.Title;
         base.SetNativeControl(spinner);
         _items = new List <string>();
         LoadItems();
         UpdateBackground();
         UpdateFont();
         UpdateCharacterSpacing();
         UpdatePadding();
         UpdateTextColor();
     }
 }
Esempio n. 2
0
 private void GetControles()
 {
     try
     {
         txtBairro    = FindViewById <Android.Widget.EditText>(Resource.Id.txtBairro);
         txtCEP       = FindViewById <Android.Widget.EditText>(Resource.Id.txtCEP);
         txtCidade    = FindViewById <Android.Widget.EditText>(Resource.Id.txtCidade);
         txtDocumento = FindViewById <Android.Widget.EditText>(Resource.Id.txtDocumento);
         txtEndereco  = FindViewById <Android.Widget.EditText>(Resource.Id.txtEndereco);
         txtNumero    = FindViewById <Android.Widget.EditText>(Resource.Id.txtNumero);
         txtRazao     = FindViewById <Android.Widget.EditText>(Resource.Id.txtRazao);
         txtTelefone  = FindViewById <Android.Widget.EditText>(Resource.Id.txtTelefone);
         spEstado     = FindViewById <Android.Widget.Spinner>(Resource.Id.spEstado);
         rbTPCNPJ     = FindViewById <Android.Widget.RadioButton>(Resource.Id.rbCNPJ);
         rbTPCPF      = FindViewById <Android.Widget.RadioButton>(Resource.Id.rbCPF);
     }
     catch (System.Exception)
     {
         Android.Widget.Toast.MakeText(this, "Erro ao receber controles.", Android.Widget.ToastLength.Short).Show();
     }
 }
        private void setupWidgets()
        {
            mBuyButton = (Button)FindViewById(Resource.Id.buy_button);
            mBuyButton.Enabled = false;
            mBuyButton.Click += delegate
            {
                    BillingController.requestPurchase(this, mSku, true /* confirm */);
            };

            mSelectItemSpinner = (Spinner)FindViewById(Resource.Id.item_choices);
            mCatalogAdapter = new CatalogAdapter(this, CatalogEntry.CATALOG);
            mSelectItemSpinner.Adapter = mCatalogAdapter;
            mSelectItemSpinner.ItemSelected += delegate(object sender, ItemEventArgs e)
            {
                mSku = CatalogEntry.CATALOG[e.Position].sku;
            };

             mOwnedItemsTable = (ListView)FindViewById(Resource.Id.owned_items);
        }