使用纯原生 RecyclerView 实现购物车效果(高仿京东购物车、淘宝购物车、天猫购物车)。不要问我为什么不使用 ExpandableListView (爱过,被坑的次数多了,就不爱了)。
Demo 中主要实现以下功能(基本上购物车的功能全实现了):
To get a Git project into your build:
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.OCNYang:CartLayout:v1.0.1'
}
更详细的使用方法请查看 Demo,Demo中实现方式和各方法的作用在注释中写的很详细。