diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/CustomSwitch.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/CustomSwitch.cs deleted file mode 100644 index e659a6977..000000000 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/CustomSwitch.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Xamarin.Forms; - -namespace eShopOnContainers.Core.Controls -{ - public class CustomSwitch : Switch - { - public static readonly BindableProperty TextOnProperty = BindableProperty.Create("TextOn", - typeof(string), typeof(CustomSwitch), string.Empty); - - public static readonly BindableProperty TextOffProperty = BindableProperty.Create("TextOff", - typeof(string), typeof(CustomSwitch), string.Empty); - - public string TextOn - { - get { return (string)this.GetValue(TextOnProperty); } - set { this.SetValue(TextOnProperty, value); } - } - - public string TextOff - { - get { return (string)this.GetValue(TextOffProperty); } - set { this.SetValue(TextOffProperty, value); } - } - } -} \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/ToggleButton.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/ToggleButton.cs new file mode 100644 index 000000000..3ef454bf4 --- /dev/null +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/ToggleButton.cs @@ -0,0 +1,148 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; +using Xamarin.Forms; + +namespace eShopOnContainers.Core.Controls +{ + public class ToggleButton : ContentView + { + public static readonly BindableProperty CommandProperty = + BindableProperty.Create("Command", typeof(ICommand), typeof(ToggleButton), null); + + public static readonly BindableProperty CommandParameterProperty = + BindableProperty.Create("CommandParameter", typeof(object), typeof(ToggleButton), null); + + public static readonly BindableProperty CheckedProperty = + BindableProperty.Create("Checked", typeof(bool), typeof(ToggleButton), false, BindingMode.TwoWay, + null, propertyChanged: OnCheckedChanged); + + public static readonly BindableProperty AnimateProperty = + BindableProperty.Create("Animate", typeof(bool), typeof(ToggleButton), false); + + public static readonly BindableProperty CheckedImageProperty = + BindableProperty.Create("CheckedImage", typeof(ImageSource), typeof(ToggleButton), null); + + public static readonly BindableProperty UnCheckedImageProperty = + BindableProperty.Create("UnCheckedImage", typeof(ImageSource), typeof(ToggleButton), null); + + private ICommand _toggleCommand; + private Image _toggleImage; + + public ToggleButton() + { + Initialize(); + } + + public ICommand Command + { + get { return (ICommand)GetValue(CommandProperty); } + set { SetValue(CommandProperty, value); } + } + + public object CommandParameter + { + get { return GetValue(CommandParameterProperty); } + set { SetValue(CommandParameterProperty, value); } + } + + public bool Checked + { + get { return (bool)GetValue(CheckedProperty); } + set { SetValue(CheckedProperty, value); } + } + + public bool Animate + { + get { return (bool)GetValue(AnimateProperty); } + set { SetValue(CheckedProperty, value); } + } + + public ImageSource CheckedImage + { + get { return (ImageSource)GetValue(CheckedImageProperty); } + set { SetValue(CheckedImageProperty, value); } + } + + public ImageSource UnCheckedImage + { + get { return (ImageSource)GetValue(UnCheckedImageProperty); } + set { SetValue(UnCheckedImageProperty, value); } + } + + public ICommand ToogleCommand + { + get + { + return _toggleCommand + ?? (_toggleCommand = new Command(() => + { + if (Checked) + { + Checked = false; + } + else + { + Checked = true; + } + + if (Command != null) + { + Command.Execute(CommandParameter); + } + })); + } + } + + private void Initialize() + { + _toggleImage = new Image(); + + Animate = true; + + GestureRecognizers.Add(new TapGestureRecognizer + { + Command = ToogleCommand + }); + + _toggleImage.Source = UnCheckedImage; + Content = _toggleImage; + } + + protected override void OnParentSet() + { + base.OnParentSet(); + _toggleImage.Source = UnCheckedImage; + Content = _toggleImage; + } + + private static async void OnCheckedChanged(BindableObject bindable, object oldValue, object newValue) + { + var toggleButton = (ToggleButton)bindable; + + if (Equals(newValue, null) && !Equals(oldValue, null)) + return; + + if (toggleButton.Checked) + { + toggleButton._toggleImage.Source = toggleButton.CheckedImage; + } + else + { + toggleButton._toggleImage.Source = toggleButton.UnCheckedImage; + } + + toggleButton.Content = toggleButton._toggleImage; + + if (toggleButton.Animate) + { + await toggleButton.ScaleTo(0.9, 50, Easing.Linear); + await Task.Delay(100); + await toggleButton.ScaleTo(1, 50, Easing.Linear); + } + } + } +} \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Exceptions/ServiceAuthenticationException.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Exceptions/ServiceAuthenticationException.cs new file mode 100644 index 000000000..d07d016a2 --- /dev/null +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Exceptions/ServiceAuthenticationException.cs @@ -0,0 +1,18 @@ +using System; + +namespace eShopOnContainers.Core.Exceptions +{ + public class ServiceAuthenticationException : Exception + { + public string Content { get; } + + public ServiceAuthenticationException() + { + } + + public ServiceAuthenticationException(string content) + { + Content = content; + } + } +} \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/GlobalSettings.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/GlobalSettings.cs index e791b80a7..85743a571 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/GlobalSettings.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/GlobalSettings.cs @@ -3,5 +3,7 @@ public static class GlobalSetting { public const string RegisterWebsite = "http://104.40.62.65/Account/Register"; + + public const string CatalogEndpoint = "http://104.40.62.65:5101/api/v1/catalog"; } } \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Catalog/CatalogService.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Catalog/CatalogService.cs new file mode 100644 index 000000000..03cc0bb4c --- /dev/null +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Catalog/CatalogService.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.ObjectModel; +using System.Threading.Tasks; +using eShopOnContainers.Core.Models.Catalog; +using eShopOnContainers.Core.Services.RequestProvider; +using System.Collections.Generic; +using eShopOnContainers.Core.Extensions; + +namespace eShopOnContainers.Core.Services.Catalog +{ + public class CatalogService : ICatalogService + { + private readonly IRequestProvider _requestProvider; + + public CatalogService(IRequestProvider requestProvider) + { + _requestProvider = requestProvider; + } + + public Task> FilterAsync(string catalogBrand, string catalogType) + { + throw new NotImplementedException(); + } + + public async Task> GetCatalogAsync() + { + UriBuilder builder = new UriBuilder(GlobalSetting.CatalogEndpoint); + + builder.Path = "/items"; + + string uri = builder.ToString(); + + IEnumerable catalogItems = + await _requestProvider.GetAsync>(uri); + + return catalogItems.ToObservableCollection(); + } + + public Task> GetCatalogBrandAsync() + { + throw new NotImplementedException(); + } + + public Task GetCatalogItemAsync(string id) + { + throw new NotImplementedException(); + } + + public Task> GetCatalogTypeAsync() + { + throw new NotImplementedException(); + } + } +} diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/RequestProvider/IRequestProvider.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/RequestProvider/IRequestProvider.cs new file mode 100644 index 000000000..7c36620fa --- /dev/null +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/RequestProvider/IRequestProvider.cs @@ -0,0 +1,17 @@ +using System.Threading.Tasks; + +namespace eShopOnContainers.Core.Services.RequestProvider +{ + public interface IRequestProvider + { + Task GetAsync(string uri); + + Task PostAsync(string uri, TResult data); + + Task PostAsync(string uri, TRequest data); + + Task PutAsync(string uri, TResult data); + + Task PutAsync(string uri, TRequest data); + } +} diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/RequestProvider/RequestProvider.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/RequestProvider/RequestProvider.cs new file mode 100644 index 000000000..06fb1aadb --- /dev/null +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/RequestProvider/RequestProvider.cs @@ -0,0 +1,102 @@ +using eShopOnContainers.Core.Exceptions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Serialization; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading.Tasks; + +namespace eShopOnContainers.Core.Services.RequestProvider +{ + public class RequestProvider : IRequestProvider + { + private readonly JsonSerializerSettings _serializerSettings; + + public RequestProvider() + { + _serializerSettings = new JsonSerializerSettings + { + ContractResolver = new CamelCasePropertyNamesContractResolver(), + DateTimeZoneHandling = DateTimeZoneHandling.Utc, + NullValueHandling = NullValueHandling.Ignore + }; + + _serializerSettings.Converters.Add(new StringEnumConverter()); + } + + public async Task GetAsync(string uri) + { + HttpClient httpClient = CreateHttpClient(); + HttpResponseMessage response = await httpClient.GetAsync(uri); + + await HandleResponse(response); + + string serialized = await response.Content.ReadAsStringAsync(); + TResult result = await Task.Run(() => JsonConvert.DeserializeObject(serialized, _serializerSettings)); + + return result; + } + + public Task PostAsync(string uri, TResult data) + { + return PostAsync(uri, data); + } + + public async Task PostAsync(string uri, TRequest data) + { + HttpClient httpClient = CreateHttpClient(); + string serialized = await Task.Run(() => JsonConvert.SerializeObject(data, _serializerSettings)); + HttpResponseMessage response = await httpClient.PostAsync(uri, new StringContent(serialized, Encoding.UTF8, "application/json")); + + await HandleResponse(response); + + string responseData = await response.Content.ReadAsStringAsync(); + + return await Task.Run(() => JsonConvert.DeserializeObject(responseData, _serializerSettings)); + } + + public Task PutAsync(string uri, TResult data) + { + return PutAsync(uri, data); + } + + public async Task PutAsync(string uri, TRequest data) + { + HttpClient httpClient = CreateHttpClient(); + string serialized = await Task.Run(() => JsonConvert.SerializeObject(data, _serializerSettings)); + HttpResponseMessage response = await httpClient.PutAsync(uri, new StringContent(serialized, Encoding.UTF8, "application/json")); + + await HandleResponse(response); + + string responseData = await response.Content.ReadAsStringAsync(); + + return await Task.Run(() => JsonConvert.DeserializeObject(responseData, _serializerSettings)); + } + + private HttpClient CreateHttpClient() + { + var httpClient = new HttpClient(); + + httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + + return httpClient; + } + + private async Task HandleResponse(HttpResponseMessage response) + { + if (!response.IsSuccessStatusCode) + { + var content = await response.Content.ReadAsStringAsync(); + + if (response.StatusCode == HttpStatusCode.Forbidden || response.StatusCode == HttpStatusCode.Unauthorized) + { + throw new ServiceAuthenticationException(content); + } + + throw new HttpRequestException(content); + } + } + } +} diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/Base/ViewModelLocator.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/Base/ViewModelLocator.cs index e9d5d1ea2..b30ac27a6 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/Base/ViewModelLocator.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/Base/ViewModelLocator.cs @@ -24,7 +24,7 @@ namespace eShopOnContainers.ViewModels.Base { _unityContainer = new UnityContainer(); - // services + // Services _unityContainer.RegisterType(); RegisterSingleton(); _unityContainer.RegisterType(); @@ -33,7 +33,7 @@ namespace eShopOnContainers.ViewModels.Base _unityContainer.RegisterType(); _unityContainer.RegisterType(); - // view models + // View models _unityContainer.RegisterType(); _unityContainer.RegisterType(); _unityContainer.RegisterType(); diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/MainView.xaml b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/MainView.xaml index b48977d47..8118b660b 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/MainView.xaml +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/MainView.xaml @@ -15,9 +15,9 @@ + WinPhone="Assets/app_settings.png" + Android="app_settings" + iOS="app_settings"/> diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml index d53e5e4e3..07940ff25 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml @@ -27,11 +27,17 @@ - - @@ -60,7 +66,7 @@ - - + Animate="True" + Style="{StaticResource SettingsToggleButtonStyle}"> + + + + + + + CartButton.xaml - + @@ -58,6 +58,7 @@ + @@ -72,6 +73,7 @@ + @@ -82,6 +84,8 @@ + + @@ -201,6 +205,18 @@ ..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll True + + ..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll + True + + + ..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll + True + + + ..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll + True + ..\..\packages\Xamarin.Forms.2.3.2.127\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll True @@ -324,4 +340,9 @@ + + + + + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/packages.config b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/packages.config index 1dfd473df..f6105022e 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/packages.config +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/packages.config @@ -2,6 +2,9 @@ + + + diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Renderers/CustomSwitchRenderer.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Renderers/CustomSwitchRenderer.cs deleted file mode 100644 index a22a2936a..000000000 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Renderers/CustomSwitchRenderer.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using Xamarin.Forms.Platform.Android; -using Xamarin.Forms; -using eShopOnContainers.Core.Controls; - -namespace eShopOnContainers.Droid.Renderers -{ - public class CustomSwitchRenderer : ViewRenderer - { - protected override void OnElementChanged(ElementChangedEventArgs e) - { - base.OnElementChanged(e); - - if (e.OldElement != null) - { - this.Element.Toggled -= ElementToggled; - return; - } - - if (this.Element == null) - { - return; - } - - var switchControl = new Android.Widget.Switch(Forms.Context) - { - TextOn = this.Element.TextOn, - TextOff = this.Element.TextOff - }; - - switchControl.CheckedChange += ControlValueChanged; - this.Element.Toggled += ElementToggled; - - this.SetNativeControl(switchControl); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - this.Control.CheckedChange -= this.ControlValueChanged; - this.Element.Toggled -= ElementToggled; - } - - base.Dispose(disposing); - } - - private void ElementToggled(object sender, ToggledEventArgs e) - { - this.Control.Checked = this.Element.IsToggled; - } - - private void ControlValueChanged(object sender, EventArgs e) - { - this.Element.IsToggled = this.Control.Checked; - } - } -} \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Renderers/CustomTabbedPageRenderer.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Renderers/CustomTabbedPageRenderer.cs index c6637dd9d..689ed0316 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Renderers/CustomTabbedPageRenderer.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Renderers/CustomTabbedPageRenderer.cs @@ -35,7 +35,7 @@ namespace eShopOnContainers.Droid.Renderers if (_tabLayout == null) { - Console.WriteLine("No TabLayout found. Bedge not added."); + Console.WriteLine("No TabLayout found. Badge not added."); return; } diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/Resource.Designer.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/Resource.Designer.cs index bb05301c1..124c8f87a 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/Resource.Designer.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/Resource.Designer.cs @@ -2021,313 +2021,319 @@ namespace eShopOnContainers.Droid public const int abc_textfield_search_material = 2130837578; // aapt resource value: 0x7f02004b - public const int background = 2130837579; + public const int app_settings = 2130837579; // aapt resource value: 0x7f02004c - public const int design_fab_background = 2130837580; + public const int background = 2130837580; // aapt resource value: 0x7f02004d - public const int design_snackbar_background = 2130837581; + public const int design_fab_background = 2130837581; // aapt resource value: 0x7f02004e - public const int fake_product_01 = 2130837582; + public const int design_snackbar_background = 2130837582; // aapt resource value: 0x7f02004f - public const int fake_product_02 = 2130837583; + public const int fake_product_01 = 2130837583; // aapt resource value: 0x7f020050 - public const int fake_product_03 = 2130837584; + public const int fake_product_02 = 2130837584; // aapt resource value: 0x7f020051 - public const int fake_product_04 = 2130837585; + public const int fake_product_03 = 2130837585; // aapt resource value: 0x7f020052 - public const int fake_product_05 = 2130837586; + public const int fake_product_04 = 2130837586; // aapt resource value: 0x7f020053 - public const int ic_audiotrack = 2130837587; + public const int fake_product_05 = 2130837587; // aapt resource value: 0x7f020054 - public const int ic_audiotrack_light = 2130837588; + public const int ic_audiotrack = 2130837588; // aapt resource value: 0x7f020055 - public const int ic_bluetooth_grey = 2130837589; + public const int ic_audiotrack_light = 2130837589; // aapt resource value: 0x7f020056 - public const int ic_bluetooth_white = 2130837590; + public const int ic_bluetooth_grey = 2130837590; // aapt resource value: 0x7f020057 - public const int ic_cast_dark = 2130837591; + public const int ic_bluetooth_white = 2130837591; // aapt resource value: 0x7f020058 - public const int ic_cast_disabled_light = 2130837592; + public const int ic_cast_dark = 2130837592; // aapt resource value: 0x7f020059 - public const int ic_cast_grey = 2130837593; + public const int ic_cast_disabled_light = 2130837593; // aapt resource value: 0x7f02005a - public const int ic_cast_light = 2130837594; + public const int ic_cast_grey = 2130837594; // aapt resource value: 0x7f02005b - public const int ic_cast_off_light = 2130837595; + public const int ic_cast_light = 2130837595; // aapt resource value: 0x7f02005c - public const int ic_cast_on_0_light = 2130837596; + public const int ic_cast_off_light = 2130837596; // aapt resource value: 0x7f02005d - public const int ic_cast_on_1_light = 2130837597; + public const int ic_cast_on_0_light = 2130837597; // aapt resource value: 0x7f02005e - public const int ic_cast_on_2_light = 2130837598; + public const int ic_cast_on_1_light = 2130837598; // aapt resource value: 0x7f02005f - public const int ic_cast_on_light = 2130837599; + public const int ic_cast_on_2_light = 2130837599; // aapt resource value: 0x7f020060 - public const int ic_cast_white = 2130837600; + public const int ic_cast_on_light = 2130837600; // aapt resource value: 0x7f020061 - public const int ic_close_dark = 2130837601; + public const int ic_cast_white = 2130837601; // aapt resource value: 0x7f020062 - public const int ic_close_light = 2130837602; + public const int ic_close_dark = 2130837602; // aapt resource value: 0x7f020063 - public const int ic_collapse = 2130837603; + public const int ic_close_light = 2130837603; // aapt resource value: 0x7f020064 - public const int ic_collapse_00000 = 2130837604; + public const int ic_collapse = 2130837604; // aapt resource value: 0x7f020065 - public const int ic_collapse_00001 = 2130837605; + public const int ic_collapse_00000 = 2130837605; // aapt resource value: 0x7f020066 - public const int ic_collapse_00002 = 2130837606; + public const int ic_collapse_00001 = 2130837606; // aapt resource value: 0x7f020067 - public const int ic_collapse_00003 = 2130837607; + public const int ic_collapse_00002 = 2130837607; // aapt resource value: 0x7f020068 - public const int ic_collapse_00004 = 2130837608; + public const int ic_collapse_00003 = 2130837608; // aapt resource value: 0x7f020069 - public const int ic_collapse_00005 = 2130837609; + public const int ic_collapse_00004 = 2130837609; // aapt resource value: 0x7f02006a - public const int ic_collapse_00006 = 2130837610; + public const int ic_collapse_00005 = 2130837610; // aapt resource value: 0x7f02006b - public const int ic_collapse_00007 = 2130837611; + public const int ic_collapse_00006 = 2130837611; // aapt resource value: 0x7f02006c - public const int ic_collapse_00008 = 2130837612; + public const int ic_collapse_00007 = 2130837612; // aapt resource value: 0x7f02006d - public const int ic_collapse_00009 = 2130837613; + public const int ic_collapse_00008 = 2130837613; // aapt resource value: 0x7f02006e - public const int ic_collapse_00010 = 2130837614; + public const int ic_collapse_00009 = 2130837614; // aapt resource value: 0x7f02006f - public const int ic_collapse_00011 = 2130837615; + public const int ic_collapse_00010 = 2130837615; // aapt resource value: 0x7f020070 - public const int ic_collapse_00012 = 2130837616; + public const int ic_collapse_00011 = 2130837616; // aapt resource value: 0x7f020071 - public const int ic_collapse_00013 = 2130837617; + public const int ic_collapse_00012 = 2130837617; // aapt resource value: 0x7f020072 - public const int ic_collapse_00014 = 2130837618; + public const int ic_collapse_00013 = 2130837618; // aapt resource value: 0x7f020073 - public const int ic_collapse_00015 = 2130837619; + public const int ic_collapse_00014 = 2130837619; // aapt resource value: 0x7f020074 - public const int ic_errorstatus = 2130837620; + public const int ic_collapse_00015 = 2130837620; // aapt resource value: 0x7f020075 - public const int ic_expand = 2130837621; + public const int ic_errorstatus = 2130837621; // aapt resource value: 0x7f020076 - public const int ic_expand_00000 = 2130837622; + public const int ic_expand = 2130837622; // aapt resource value: 0x7f020077 - public const int ic_expand_00001 = 2130837623; + public const int ic_expand_00000 = 2130837623; // aapt resource value: 0x7f020078 - public const int ic_expand_00002 = 2130837624; + public const int ic_expand_00001 = 2130837624; // aapt resource value: 0x7f020079 - public const int ic_expand_00003 = 2130837625; + public const int ic_expand_00002 = 2130837625; // aapt resource value: 0x7f02007a - public const int ic_expand_00004 = 2130837626; + public const int ic_expand_00003 = 2130837626; // aapt resource value: 0x7f02007b - public const int ic_expand_00005 = 2130837627; + public const int ic_expand_00004 = 2130837627; // aapt resource value: 0x7f02007c - public const int ic_expand_00006 = 2130837628; + public const int ic_expand_00005 = 2130837628; // aapt resource value: 0x7f02007d - public const int ic_expand_00007 = 2130837629; + public const int ic_expand_00006 = 2130837629; // aapt resource value: 0x7f02007e - public const int ic_expand_00008 = 2130837630; + public const int ic_expand_00007 = 2130837630; // aapt resource value: 0x7f02007f - public const int ic_expand_00009 = 2130837631; + public const int ic_expand_00008 = 2130837631; // aapt resource value: 0x7f020080 - public const int ic_expand_00010 = 2130837632; + public const int ic_expand_00009 = 2130837632; // aapt resource value: 0x7f020081 - public const int ic_expand_00011 = 2130837633; + public const int ic_expand_00010 = 2130837633; // aapt resource value: 0x7f020082 - public const int ic_expand_00012 = 2130837634; + public const int ic_expand_00011 = 2130837634; // aapt resource value: 0x7f020083 - public const int ic_expand_00013 = 2130837635; + public const int ic_expand_00012 = 2130837635; // aapt resource value: 0x7f020084 - public const int ic_expand_00014 = 2130837636; + public const int ic_expand_00013 = 2130837636; // aapt resource value: 0x7f020085 - public const int ic_expand_00015 = 2130837637; + public const int ic_expand_00014 = 2130837637; // aapt resource value: 0x7f020086 - public const int ic_media_pause = 2130837638; + public const int ic_expand_00015 = 2130837638; // aapt resource value: 0x7f020087 - public const int ic_media_play = 2130837639; + public const int ic_media_pause = 2130837639; // aapt resource value: 0x7f020088 - public const int ic_media_route_disabled_mono_dark = 2130837640; + public const int ic_media_play = 2130837640; // aapt resource value: 0x7f020089 - public const int ic_media_route_off_mono_dark = 2130837641; + public const int ic_media_route_disabled_mono_dark = 2130837641; // aapt resource value: 0x7f02008a - public const int ic_media_route_on_0_mono_dark = 2130837642; + public const int ic_media_route_off_mono_dark = 2130837642; // aapt resource value: 0x7f02008b - public const int ic_media_route_on_1_mono_dark = 2130837643; + public const int ic_media_route_on_0_mono_dark = 2130837643; // aapt resource value: 0x7f02008c - public const int ic_media_route_on_2_mono_dark = 2130837644; + public const int ic_media_route_on_1_mono_dark = 2130837644; // aapt resource value: 0x7f02008d - public const int ic_media_route_on_mono_dark = 2130837645; + public const int ic_media_route_on_2_mono_dark = 2130837645; // aapt resource value: 0x7f02008e - public const int ic_pause_dark = 2130837646; + public const int ic_media_route_on_mono_dark = 2130837646; // aapt resource value: 0x7f02008f - public const int ic_pause_light = 2130837647; + public const int ic_pause_dark = 2130837647; // aapt resource value: 0x7f020090 - public const int ic_play_dark = 2130837648; + public const int ic_pause_light = 2130837648; // aapt resource value: 0x7f020091 - public const int ic_play_light = 2130837649; + public const int ic_play_dark = 2130837649; // aapt resource value: 0x7f020092 - public const int ic_speaker_dark = 2130837650; + public const int ic_play_light = 2130837650; // aapt resource value: 0x7f020093 - public const int ic_speaker_group_dark = 2130837651; + public const int ic_speaker_dark = 2130837651; // aapt resource value: 0x7f020094 - public const int ic_speaker_group_light = 2130837652; + public const int ic_speaker_group_dark = 2130837652; // aapt resource value: 0x7f020095 - public const int ic_speaker_light = 2130837653; + public const int ic_speaker_group_light = 2130837653; // aapt resource value: 0x7f020096 - public const int ic_successstatus = 2130837654; + public const int ic_speaker_light = 2130837654; // aapt resource value: 0x7f020097 - public const int ic_tv_dark = 2130837655; + public const int ic_successstatus = 2130837655; // aapt resource value: 0x7f020098 - public const int ic_tv_light = 2130837656; + public const int ic_tv_dark = 2130837656; // aapt resource value: 0x7f020099 - public const int icon = 2130837657; + public const int ic_tv_light = 2130837657; // aapt resource value: 0x7f02009a - public const int menu_cart = 2130837658; + public const int icon = 2130837658; // aapt resource value: 0x7f02009b - public const int menu_filter = 2130837659; + public const int menu_cart = 2130837659; // aapt resource value: 0x7f02009c - public const int menu_profile = 2130837660; + public const int menu_filter = 2130837660; // aapt resource value: 0x7f02009d - public const int mr_dialog_material_background_dark = 2130837661; + public const int menu_profile = 2130837661; // aapt resource value: 0x7f02009e - public const int mr_dialog_material_background_light = 2130837662; + public const int mr_dialog_material_background_dark = 2130837662; // aapt resource value: 0x7f02009f - public const int mr_ic_audiotrack_light = 2130837663; + public const int mr_dialog_material_background_light = 2130837663; // aapt resource value: 0x7f0200a0 - public const int mr_ic_cast_dark = 2130837664; + public const int mr_ic_audiotrack_light = 2130837664; // aapt resource value: 0x7f0200a1 - public const int mr_ic_cast_light = 2130837665; + public const int mr_ic_cast_dark = 2130837665; // aapt resource value: 0x7f0200a2 - public const int mr_ic_close_dark = 2130837666; + public const int mr_ic_cast_light = 2130837666; // aapt resource value: 0x7f0200a3 - public const int mr_ic_close_light = 2130837667; + public const int mr_ic_close_dark = 2130837667; // aapt resource value: 0x7f0200a4 - public const int mr_ic_media_route_connecting_mono_dark = 2130837668; + public const int mr_ic_close_light = 2130837668; // aapt resource value: 0x7f0200a5 - public const int mr_ic_media_route_connecting_mono_light = 2130837669; + public const int mr_ic_media_route_connecting_mono_dark = 2130837669; // aapt resource value: 0x7f0200a6 - public const int mr_ic_media_route_mono_dark = 2130837670; + public const int mr_ic_media_route_connecting_mono_light = 2130837670; // aapt resource value: 0x7f0200a7 - public const int mr_ic_media_route_mono_light = 2130837671; + public const int mr_ic_media_route_mono_dark = 2130837671; // aapt resource value: 0x7f0200a8 - public const int mr_ic_pause_dark = 2130837672; + public const int mr_ic_media_route_mono_light = 2130837672; // aapt resource value: 0x7f0200a9 - public const int mr_ic_pause_light = 2130837673; + public const int mr_ic_pause_dark = 2130837673; // aapt resource value: 0x7f0200aa - public const int mr_ic_play_dark = 2130837674; + public const int mr_ic_pause_light = 2130837674; // aapt resource value: 0x7f0200ab - public const int mr_ic_play_light = 2130837675; - - // aapt resource value: 0x7f0200b1 - public const int notification_template_icon_bg = 2130837681; + public const int mr_ic_play_dark = 2130837675; // aapt resource value: 0x7f0200ac - public const int product_add = 2130837676; + public const int mr_ic_play_light = 2130837676; + + // aapt resource value: 0x7f0200b3 + public const int notification_template_icon_bg = 2130837683; // aapt resource value: 0x7f0200ad - public const int roundedbg = 2130837677; + public const int product_add = 2130837677; // aapt resource value: 0x7f0200ae - public const int roundedbgdark = 2130837678; + public const int roundedbg = 2130837678; // aapt resource value: 0x7f0200af - public const int splash_drawable = 2130837679; + public const int roundedbgdark = 2130837679; // aapt resource value: 0x7f0200b0 - public const int user_profile = 2130837680; + public const int splash_drawable = 2130837680; + + // aapt resource value: 0x7f0200b1 + public const int toggle_azure = 2130837681; + + // aapt resource value: 0x7f0200b2 + public const int toggle_local = 2130837682; static Drawable() { diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-hdpi/app_settings.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-hdpi/app_settings.png new file mode 100644 index 000000000..b9ee5d1c0 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-hdpi/app_settings.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-hdpi/toggle_azure.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-hdpi/toggle_azure.png new file mode 100644 index 000000000..42e1d3c49 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-hdpi/toggle_azure.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-hdpi/toggle_local.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-hdpi/toggle_local.png new file mode 100644 index 000000000..44c4098c9 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-hdpi/toggle_local.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xhdpi/app_settings.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xhdpi/app_settings.png new file mode 100644 index 000000000..0bd7b6049 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xhdpi/app_settings.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xhdpi/toggle_azure.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xhdpi/toggle_azure.png new file mode 100644 index 000000000..b3134525c Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xhdpi/toggle_azure.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xhdpi/toggle_local.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xhdpi/toggle_local.png new file mode 100644 index 000000000..1a3cedf0a Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xhdpi/toggle_local.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxhdpi/app_settings.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxhdpi/app_settings.png new file mode 100644 index 000000000..c2f253932 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxhdpi/app_settings.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxhdpi/toggle_azure.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxhdpi/toggle_azure.png new file mode 100644 index 000000000..a6fd10a02 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxhdpi/toggle_azure.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxhdpi/toggle_local.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxhdpi/toggle_local.png new file mode 100644 index 000000000..bb62ef7d1 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxhdpi/toggle_local.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/background.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/background.png deleted file mode 100644 index c578aa88b..000000000 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/background.png and /dev/null differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/icon.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/icon.png deleted file mode 100644 index 8256a9996..000000000 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/icon.png and /dev/null differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/menu_cart.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/menu_cart.png deleted file mode 100644 index 7c9c64cb3..000000000 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/menu_cart.png and /dev/null differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/user_profile.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/user_profile.png deleted file mode 100644 index b6aa8e0bc..000000000 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/drawable-xxxhdpi/user_profile.png and /dev/null differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/app.config b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/app.config index a061fe0fd..056e15e6f 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/app.config +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/app.config @@ -1,22 +1,26 @@ - + - - + + - - + + - - + + - - + + + + + + diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj index cb65dfd5f..36e22dc99 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj @@ -17,7 +17,7 @@ Off Properties\AndroidManifest.xml true - v6.0 + v7.0 armeabi,armeabi-v7a,x86 @@ -203,7 +203,6 @@ - @@ -300,34 +299,49 @@ - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj.bak b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj.bak index 83c3d49ab..cb65dfd5f 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj.bak +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj.bak @@ -17,7 +17,7 @@ Off Properties\AndroidManifest.xml true - v7.0 + v6.0 armeabi,armeabi-v7a,x86 @@ -203,6 +203,7 @@ + diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/App.xaml b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/App.xaml index 51f9ddfc0..74b399cba 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/App.xaml +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/App.xaml @@ -284,8 +284,316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +