ViQueryProductLayout
open class ViQueryProductLayout: StackLayout<UIView>
                This is almost the same as product card
used for displaying the search query product i.e. the product that is being searched during Find Similar
the product info are displayed on the right of the image (for product card in search results, the info is displayed below image)
- 
                  
                  
Undocumented
Declaration
Swift
open class ViQueryProductLayout: StackLayout<UIView> - 
                  
init(imgUrl:imageConfig:heading:headingConfig:label:labelConfig:price:priceConfig:discountPrice:discountPriceConfig:pricesHorizontalSpacing:labelLeftPadding:)constructor helper
Declaration
Swift
public convenience init( imgUrl: URL?, imageConfig: ViImageConfig, heading: String? , headingConfig: ViLabelConfig = ViLabelConfig(), label: String? = nil, labelConfig: ViLabelConfig = ViLabelConfig.default_label_config, price: Float?, priceConfig: ViLabelConfig = ViLabelConfig.default_price_config, discountPrice : Float?, discountPriceConfig: ViLabelConfig = ViLabelConfig.default_discount_price_config, pricesHorizontalSpacing: CGFloat = ViProductCardLayout.default_spacing, labelLeftPadding: CGFloat = ViProductCardLayout.default_spacing ) - 
                  
init(img_url:img_size:img_contentMode:loading_img:err_img:label:label_font:label_text_color:label_num_of_lines:heading:heading_font:heading_text_color:heading_num_of_lines:price:price_font:price_text_color:price_string_format:price_strike_through:discounted_price:discounted_price_font:discounted_price_text_color:discounted_price_string_format:discounted_price_strike_through:prices_horizontal_spacing:label_left_padding:)Constructor for query product card
- Parameters:
- img_url: product image url
 - img_size: product image size
 - img_contentMode: contentMode for ImageView
 - loading_img: loading/placeholder image
 - err_img: error image (when fail to download)
 - label: label text e.g. to display product brand
 - label_font: label font, default to Roboto Bold
 - label_text_color: label text color, default to black
 - label_num_of_lines: number of lines for label, default 1 line
 - heading: heading text e.g. to display product name or title
 - heading_font: heading font , default to Roboto Regular
 - heading_text_color: heading text color, default to black
 - heading_num_of_lines: number of lines for heading label, default 1 line
 - price: product price
 - price_font: product price font, default to Roboto Regular
 - price_text_color: product price label text color, default to red color
 - price_string_format: string format to display price, must include .f specifier e.g. %.2f
 - price_strike_through: whether to strike through the price e.g. during discount, default to no
 - discounted_price: discounted product price
 - discounted_price_font: discounted price label font , default to Roboto Regular
 - discounted_price_text_color: discounted price label text color , default to gray color and strike through
 - discounted_price_string_format: string format to display discounted price, must include .f specifier e.g. %.2f
 - discounted_price_strike_through: whether to strike through discounted price label, default to no
 - prices_horizontal_spacing: spacing between price and discounted price label
 - label_left_padding: padding of labels from parent left
 
 
Declaration
Swift
public init( // image settings img_url: URL?, img_size: CGSize, img_contentMode: UIViewContentMode = ViImageConfig.default_content_mode, loading_img: UIImage? = nil, err_img: UIImage? = nil, // label label: String? = nil, label_font: UIFont = ViTheme.sharedInstance.default_bold_font, label_text_color: UIColor = ViTheme.sharedInstance.default_txt_color, label_num_of_lines: Int = 1, // heading heading: String? = nil, heading_font: UIFont = ViTheme.sharedInstance.default_font, heading_text_color: UIColor = ViTheme.sharedInstance.default_txt_color, heading_num_of_lines: Int = 1, // price price: Float?, price_font : UIFont = ViTheme.sharedInstance.default_font, price_text_color: UIColor = ViTheme.sharedInstance.default_txt_color, price_string_format: String = ViTheme.sharedInstance.default_price_format, price_strike_through: Bool = false, // discount price discounted_price : Float?, discounted_price_font : UIFont = ViTheme.sharedInstance.default_font, discounted_price_text_color: UIColor = ViTheme.sharedInstance.default_discounted_price_text_color, discounted_price_string_format: String = ViTheme.sharedInstance.default_discount_price_format, discounted_price_strike_through: Bool = false, // spacing prices_horizontal_spacing: CGFloat = default_spacing, label_left_padding: CGFloat = default_spacing )Parameters
img_url: product image url
img_size: product image size
img_contentMode: contentMode for ImageView
loading_img: loading/placeholder image
err_img: error image (when fail to download)
labellabel text e.g. to display product brand
label_font: label font, default to Roboto Bold
label_text_color: label text color, default to black
label_num_of_lines: number of lines for label, default 1 line
headingheading text e.g. to display product name or title
heading_font: heading font , default to Roboto Regular
heading_text_color: heading text color, default to black
heading_num_of_lines: number of lines for heading label, default 1 line
priceproduct price
price_font: product price font, default to Roboto Regular
price_text_color: product price label text color, default to red color
price_string_format: string format to display price, must include .f specifier e.g. %.2f
price_strike_through: whether to strike through the price e.g. during discount, default to no
discounted_price: discounted product price
discounted_price_font: discounted price label font , default to Roboto Regular
discounted_price_text_color: discounted price label text color , default to gray color and strike through
discounted_price_string_format: string format to display discounted price, must include .f specifier e.g. %.2f
discounted_price_strike_through: whether to strike through discounted price label, default to no
prices_horizontal_spacing: spacing between price and discounted price label
label_left_padding: padding of labels from parent left
 - Parameters:
 
View on GitHub
        ViQueryProductLayout Class Reference