示例#1
0
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			View v = inflater.Inflate (Resource.Layout.ChooseCoffee, null);

			favChecked = false;

			v.FindViewById<ImageView> (Resource.Id.chosen_logo).SetBackgroundResource (TempStorage.ChosenLogo);
			coffeeLv = v.FindViewById<ExpandableListView> (Android.Resource.Id.List);
			payButton = v.FindViewById<Button> (Resource.Id.btnPay);

			payButton.Click += delegate {
				ProcessPayments();
			};

			coffeeAdapter = new ExpandableListAdapter (this.Activity, CoffeeData);

			coffeeLv.SetAdapter(coffeeAdapter);
			coffeeLv.SetOnChildClickListener (this);

			//don't forget!
			price = "4.50";

			return v;
		}