public void LaunchProductDetailsActivity(Activity activity, Product product, ProductDetailsTheme theme)
        {
            var builder = new ProductDetailsBuilder(this, BuyClient);
            var intent  = builder.SetShopDomain(BuyClient.ShopDomain)
                          .SetProduct(product)
                          .SetTheme(theme)
                          .SetShop(Shop)
                          .SetWebReturnToUrl(GetString(Resource.String.web_return_to_url))
                          .SetWebReturnToLabel(GetString(Resource.String.web_return_to_label))
                          .Build();

            activity.StartActivityForResult(intent, 1);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState, Resource.Layout.product_list_activity);

            SetTitle(Resource.String.choose_product);

            useProductDetailsActivity = false;
            theme = new ProductDetailsTheme(Resources);

            if (Intent.HasExtra(ExtraCollectionId))
            {
                collectionId = Intent.GetStringExtra(ExtraCollectionId);
            }

            productViewOptionsContainer            = FindViewById(Resource.Id.product_view_options_container);
            productViewOptionsContainer.Visibility = ViewStates.Gone;

            FindViewById <Switch>(Resource.Id.product_details_activity_switch).CheckedChange += (sender, e) =>
            {
                useProductDetailsActivity = e.IsChecked;
                productViewOptionsContainer.Visibility = e.IsChecked ? ViewStates.Visible : ViewStates.Gone;
            };

            FindViewById <Switch>(Resource.Id.theme_style_switch).CheckedChange += (sender, e) =>
            {
                theme.SetStyle(e.IsChecked ? ProductDetailsTheme.Style.Light : ProductDetailsTheme.Style.Dark);
            };

            FindViewById <Switch>(Resource.Id.product_image_bg_switch).CheckedChange += (sender, e) =>
            {
                theme.SetShowProductImageBackground(e.IsChecked);
            };

            accentColorView = FindViewById(Resource.Id.accent_color_view);
            accentColorView.SetBackgroundColor(new Color(theme.AccentColor));
            accentColorView.Click += delegate
            {
                var cpd = new HSVColorPickerDialog(this, new Color(theme.AccentColor), (color) =>
                {
                    theme.AccentColor = color;
                    accentColorView.SetBackgroundColor(color);
                });
                cpd.SetTitle(Resource.String.choose_accent_color);
                cpd.Show();
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState, Resource.Layout.product_list_activity);

            SetTitle(Resource.String.choose_product);

            useProductDetailsActivity = false;
            theme = new ProductDetailsTheme(Resources);

            if (Intent.HasExtra(ExtraCollectionId))
            {
                collectionId = Intent.GetStringExtra(ExtraCollectionId);
            }

            productViewOptionsContainer = FindViewById(Resource.Id.product_view_options_container);
            productViewOptionsContainer.Visibility = ViewStates.Gone;

            FindViewById<Switch>(Resource.Id.product_details_activity_switch).CheckedChange += (sender, e) =>
            {
                useProductDetailsActivity = e.IsChecked;
                productViewOptionsContainer.Visibility = e.IsChecked ? ViewStates.Visible : ViewStates.Gone;
            };

            FindViewById<Switch>(Resource.Id.theme_style_switch).CheckedChange += (sender, e) =>
            {
                theme.SetStyle(e.IsChecked ? ProductDetailsTheme.Style.Light : ProductDetailsTheme.Style.Dark);
            };

            FindViewById<Switch>(Resource.Id.product_image_bg_switch).CheckedChange += (sender, e) =>
            {
                theme.SetShowProductImageBackground(e.IsChecked);
            };

            accentColorView = FindViewById(Resource.Id.accent_color_view);
            accentColorView.SetBackgroundColor(new Color(theme.AccentColor));
            accentColorView.Click += delegate
            {
                var cpd = new HSVColorPickerDialog(this, new Color(theme.AccentColor), (color) =>
                {
                    theme.AccentColor = color;
                    accentColorView.SetBackgroundColor(color);
                });
                cpd.SetTitle(Resource.String.choose_accent_color);
                cpd.Show();
            };
        }
 public void LaunchProductDetailsActivity(Activity activity, Product product, ProductDetailsTheme theme)
 {
     var builder = new ProductDetailsBuilder(this, BuyClient);
     var intent = builder.SetShopDomain(BuyClient.ShopDomain)
             .SetProduct(product)
             .SetTheme(theme)
             .SetShop(Shop)
             .SetWebReturnToUrl(GetString(Resource.String.web_return_to_url))
             .SetWebReturnToLabel(GetString(Resource.String.web_return_to_label))
             .Build();
     activity.StartActivityForResult(intent, 1);
 }