Giter Club home page Giter Club logo

kjiawei / shoppingcarbestimplementation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wangyang0313/shoppingcarbestimplementation

0.0 1.0 0.0 229 KB

Android 购物车的最佳实现(通过ExpandableListView实现分店铺),主要功能包括:单选、全选、合计、删除、商品数量的加减,为了方便测试又新增了刷新数据功能。博客地址:https://blog.csdn.net/qq941263013/article/details/80901277

Java 100.00%

shoppingcarbestimplementation's Introduction

ShoppingCarBestImplementation

Android 购物车的最佳实现(通过ExpandableListView实现分店铺),主要功能包括:单选、全选、合计、删除、商品数量的加减,为了方便测试又新增了刷新数据功能。
项目博客地址:https://blog.csdn.net/qq941263013/article/details/80901277
个人博客地址:https://blog.csdn.net/qq941263013
GIF效果图:



简单说明(详细描述见博客、源码):
    1.页面布局文件:实际开发中,如果遇到ScrollView嵌套ExpandableListView控件,可以使用自定义控件ExpandableListViewForScrollView解决ScrollView嵌套ExpandableListView,ExpandableListView显示不全的问题。(地址:https://blog.csdn.net/qq941263013/article/details/80655909
    2.初始化数据(含Bean类):在bean类的DatasBean中新增了isSelect_shop属性,用来判断店铺是否被选中;在GoodsBean中新增了isSelect属性,用来判断商品是否被选中。
    3.初始化ExpandableListView:使用的是ExpandableListView,所以adapter继承BaseExpandableListAdapter,并实现其未实现的方法。
    4.初始化ExpandableListView的数据:初始化了ExpandableListView的数据,并保证数据刷新时,页面保持当前位置。同时也使ExpandableListView的所有组展开,并点击无效果。

shoppingcarbestimplementation's People

Contributors

wangyang0313 avatar kjiawei avatar

Watchers

 avatar

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.