protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); _foodItemsApi = RestService.For<IFridgeDateApi<FoodItemUser, string>>(Core.Settings.Values.BASE_URL); _userApi = RestService.For<IUserApi>(Core.Settings.Values.BASE_URL + "/User"); var progressBar = new ProgressBar(this) { LayoutParameters = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent), Indeterminate = true }; SetContentView(Resource.Layout.Main); Task.Run(async () => await SetFoodItems(progressBar)); var root = FindViewById<ViewGroup>(Resource.Id.content); root.AddView(progressBar); }
public MainPage() { this.InitializeComponent(); _api = RestService.For<IFridgeDateApi<FoodItem, string>>("http://localhost:47477/api/FoodItem"); }
public FoodItemController(IMapper mapper) { _mapper = mapper; _api = RestService.For<IFridgeDateApi<FoodItem, string>>("http://localhost:47477/api/FoodItem"); }