Giter Club home page Giter Club logo

sku's Introduction

SuperRecycleView

博文 : https://www.jianshu.com/p/86b6422a78b2

该项目主要是: https://github.com/GongWnbo/SuperRecycleView 项目 我只是对sku 部分进行了算法优化,选择商品时速度加快了一点, 选择时提供个顾客的选择更加贴近现实,所有算法理论来源于: https://keelii.com/2016/12/22/sku-multi-dimensional-attributes-state-algorithm/

sku优化具体效果

  • 选中的行:不再是除了选中的规格其他规格全部隐藏,会做一个判断,没有可能存在才会隐藏
  • 没有选中的行:规格按钮和已选中的规格组合,判断是否可能存在该规格,没可能存在则隐藏

效果.gif

修改部分:

GoodsPropertyAdapter 类 {

void addProperty(){

该方法sku算法全部替换

} }

void put(int position, String title) {

修改部分

}

SkuActivity 类{

select(HashMap<Integer, String> sam) {

部分修改 }

}

utils 包增加了 https://github.com/hfkai/SkuSelects 项目下的Sku工具类

关于优化

还有优化空间,在https://keelii.com/2016/12/22/sku-multi-dimensional-attributes-state-algorithm/ 最后单选流程有记载,但是目前满足了需求,现在还没有优化的计划,

最后

博文 : https://www.jianshu.com/p/86b6422a78b2

我只是一个改代码的,如想star 请移步

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.