自定义二级列表
public class MyExpanableListView extends ExpandableListView {
//自定义二级列表
public MyExpanableListView(Context context) {
super(context);
}
public MyExpanableListView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyExpanableListView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
//高度
int height = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE>>2,MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, height);
}
}
路径
public class ApiUrils {
//详情页面 ?source=android&pid=12
public static String detailGoods = "https://www.zhaoapi.cn/product/getProductDetail";
//查询购物车的路径 https://www.zhaoapi.cn/product/getCarts?uid=71&source=android
public static String selectCartUrl = "https://www.zhaoapi.cn/product/getCarts";
//更新购物车 ?uid=71&sellerid=1&pid=1&selected=0&num=10
public static String updateCartUrl = "https://www.zhaoapi.cn/product/updateCarts";
//添加购物车 ?uid=11439&pid=12&source=android
public static String addCartUrl = "https://www.zhaoapi.cn/product/addCart";
//删除购物车 ?uid=72&pid=1
public static String deleCartUrl = "https://www.zhaoapi.cn/product/deleteCart";
//取消订单
public static String updateOrder = "https://www.zhaoapi.cn/product/updateOrder";
//获取订单
public static String getOrders = "https://www.zhaoapi.cn/product/getOrders";
//创建订单 ?uid=71&price=99.99
public static String createOrders = "https://www.zhaoapi.cn/product/createOrder";
}