Need help with android-sku?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

wuhenzhizao
498 Stars 74 Forks 36 Commits 2 Opened issues

Description

🔥 Android Sku属性选择器, 类似于淘宝,天猫,京东,支持MVVM,直接使用

Services available

!
?

Need anything else?

Contributors list

Sku

Android Sku选择器, 类似于淘宝,天猫,京东,支持多维属性,购物车动画,支持MVVM架构,可以直接使用

Demo下载

功能描述

  1. 支持多维属性,库存为空判断;
  2. 支持设置选中指定的sku;
  3. 支持手动输入数量;
screenshot screenshot

添加依赖

Download

buildscript {
    allprojects {
        repositories {
            jcenter()
        }
    }
}

dependencies { compile 'com.wuhenzhizao:sku:1.0.4' }

绑定数据

SkuSelectScrollView.setSkuList(List skuList);

设置选中的sku(一个sku时,默认选中)

SkuSelectScrollView.setSelectedSku(Sku sku);

设置监听

SkuSelectScrollView.setListener(new OnSkuListener() {
    /**
     * 属性取消选中
     *
     * @param unselectedAttribute
     */
    public void onUnselected(SkuAttribute unselectedAttribute) {}

/**
 * 属性选中
 *
 * @param selectAttribute
 */
public void onSelect(SkuAttribute selectAttribute) {}

/**
 * sku选中
 *
 * @param sku
 */
public void onSkuSelected(Sku sku) {});

使用MVVM架构

组件提供SkuViewDelegate来对MVVM模式下的交互进行支持


技术交流

|QQ交流群| |:---:| |screenshot|

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.