一、简介
承接上文:尚硅谷Android项目之_硅谷商城项目全套源码解析(六、个人中心)
上篇博客概括的介绍了硅谷商城项目的个人中心模块技术要点。本篇内容给大家讲解硅谷商城项目购物车,购物车模块采用的技术包括:采用自定义技术实现购物车的加减号、采用CartStorage实现购物车业务的处理、采用popupwindow实现购物车的对话框、实现联系客服功能、
采用HTML5和Android互调技术实现详情页面、集成支付宝支付功能。
二、详细资源地址
由于篇幅所限,详情情况见如下地址视频和笔记
项目免费视频讲解下载地址:http://www.atguigu.com/download.shtml
github地址:https://github.com/atguigu01/Shopping
作者:大海哥
三、效果演示
四、技术详解
1、采用自定义技术实现购物车的加减号;
1)布局
<?xml version="1.0"encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_sub"
android:layout_width="wrap_content"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_sub"
android:layout_width="wrap_content"