コード例 #1
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);
            var view = inflater.Inflate(Resource.Layout.ProductFilterDialog, container, false);

            this.PriceMinEditText   = view.FindViewById <EditText>(Resource.Id.PriceMinEditText);
            this.PriceMaxEditText   = view.FindViewById <EditText>(Resource.Id.PriceMaxEditText);
            this.MemoryMinEditText  = view.FindViewById <EditText>(Resource.Id.MemoryMinEditText);
            this.MemoryMaxEditText  = view.FindViewById <EditText>(Resource.Id.MemoryMaxEditText);
            this.RAMMinEditText     = view.FindViewById <EditText>(Resource.Id.RAMMinEditText);
            this.RAMMaxEditText     = view.FindViewById <EditText>(Resource.Id.RAMMaxEditText);
            this.YearMinEditText    = view.FindViewById <EditText>(Resource.Id.YearMinEditText);
            this.YearMaxEditText    = view.FindViewById <EditText>(Resource.Id.YearMaxEditText);
            this.BatteryMinEditText = view.FindViewById <EditText>(Resource.Id.BatteryMinEditText);
            this.BatteryMaxEditText = view.FindViewById <EditText>(Resource.Id.BatteryMaxEditText);
            this.CameraMinEditText  = view.FindViewById <EditText>(Resource.Id.CameraMinEditText);
            this.CameraMaxEditText  = view.FindViewById <EditText>(Resource.Id.CameraMaxEditText);

            this.BrandAutoCompleteTextView = view.FindViewById <AutoCompleteTextView>(Resource.Id.BrandAutoCompleteTextView);
            var items   = ProductAPIController.GetBrands();
            var adapter = new ArrayAdapter(this.Context, Android.Resource.Layout.SimpleDropDownItem1Line, items);

            this.BrandAutoCompleteTextView.Adapter = adapter;

            this.DoneButton        = view.FindViewById <Button>(Resource.Id.DoneButton);
            this.DoneButton.Click += DoneButton_Click;
            return(view);
        }