购物车订单实现

电商项目购物车及订单系统实现 概述 购物车和订单是电商项目的核心,本文将简单介绍一下两者的实现。 一、购物车功能实现 1.功能说明 1、商品加入购物车时,不是必须要求登录。 2、计算购物车中商品的总价。当商品数量发生变化时需要重新计算。 3、用户可以删除购物车中的商品。 4、用户下单后,删除购物车的功能。 2.功能分析 1、在用户不登陆的清空下也可以使用购物车,那么就需要把购物车信息放入cookie中。 2、可以把商品信息,存放到pojo中,然后序列化成json存入cookie中。 3、取商品信息可以从cookie中把json数据取出 阅读详情

UTils工具类

APIService类

public interface APIService {
    @GET("product/getOrders?uid=71")
    Observable<OrderBean> order();
    @GET("product/updateOrder")
    Call<ResponseBody> update(@Query("uid") int uid,@Query("status") int status,@Query("orderId") int orderId);
}

MyInterceptor类

public class MyInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {

        Request request = chain.request();

        //&source=android这个是get带参数
        //?source=android 这个是只能get不带传参,还有就是post
        String url = request.url().toString()+"&source=android";

        Request request1 = request.newBuilder().url(url).build();

        Response response = chain.proceed(request1);
        return response;
    }
}

OkHttpUtils类

public class OkHttpUtils {


    private static OkHttpClient client = null ;


    public static OkHttpClient getInstance(){

        if(client == null){
            synchronized (OkHttpUtils.class){
                if(client == null){
                    client = new OkHttpClient.Builder()
                            .connectTimeout(20000, TimeUnit.SECONDS)
                            .writeTimeout(20000,TimeUnit.SECONDS)
                            .readTimeout(20000,TimeUnit.SECONDS)
                            //.addInterceptor(new MyInterceptor())
                            .build();
                }
            }
        }
        return client;
    }
}


RetrofitUtils类

public class RetrofitUtils {


    private static APIService service  = null ;


    public static APIService getInstance(){
        if(service == null){
            synchronized (RetrofitUtils.class){

                Retrofit retrofit = new Retrofit.Builder()
                        .baseUrl("https://www.zhaoapi.cn/")
                        .addConverterFactory(GsonConverterFactory.create())
                        .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                        //.client(OkHttpUtils.getInstance())
                        .build();
                service = retrofit.create(APIService.class);
            }
        }
        return service;
    }

}


view层接口

public interface IOrderView {
    void showOrder(List<OrderBean.DataBean> list);
}

model层方法

model接口

public interface IOrderModel {
    void showDate(Order order);
    interface Order{
        void complate(List<OrderBean.DataBean> list);
    }
}

model类

public class OrderModel implements IOrderModel {

    @Override
    public void showDate(final Order order) {
        RetrofitUtils.getInstance().order()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Observer<OrderBean>() {
                    @Override
                    public void onCompleted() {

                    }

                    @Override
                    public void onError(Throwable e) {
                        Log.i("=========", "onError: "+e.toString());
                    }

                    @Override
                    public void onNext(OrderBean orderBean) {
                        List<OrderBean.DataBean> list = orderBean.getData();
                        order.complate(list);
                    }
                });
    }
}

Presenter层方法

IPresenter接口

public interface IPreesenter<T> {
    void attach(T view);
    void deach();
}

OrderPresenter类

public class OrderPresenter implements IPreesenter<IOrderView>{
    IOrderModel model;
    SoftReference<IOrderView> softReference;

    public OrderPresenter(IOrderView view) {
        attach(view);
        model = new OrderModel();
    }
    public void DateOrder(){
        model.showDate(new IOrderModel.Order() {
            @Override
            public void complate(List<OrderBean.DataBean> list) {
                softReference.get().showOrder(list);
            }
        });
    }
    @Override
    public void attach(IOrderView view) {
        softReference = new SoftReference<IOrderView>(view);
    }

    @Override
    public void deach() {
        softReference.clear();
    }
}

适配器

MyAdapter适配器

public class MyAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
    Context context;
    List<OrderBean.DataBean> list;
    OrderPresenter presenter;


    public MyAdapter(Context context, List<OrderBean.DataBean> list,OrderPresenter presenter) {
        this.context = context;
        this.list = list;
        this.presenter = presenter;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.qb_item,parent, false);;
        MyViewHolder holder = new MyViewHolder(view);
        return holder;
    }
    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
        ((MyViewHolder)holder).mTitleText.setText(list.get(position).getTitle());
        ((MyViewHolder)holder).mPriceText.setText("价格: "+list.get(position).getPrice());
        ((MyViewHolder)holder).mTameText.setText(list.get(position).getCreatetime());
        if (list.get(position).getStatus()==0){
            ((MyViewHolder) holder).mDaizhifuText.setText("待支付");
            ((MyViewHolder) holder).mDaizhifuText.setTextColor(Color.RED);
            ((MyViewHolder) holder).mBtnText.setText("取消订单");
            ((MyViewHolder) holder).mBtnText.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    AlertDialog.Builder builder = new AlertDialog.Builder(context);
                    builder.setTitle("提示");
                    builder.setMessage("确定要取消订单吗?");
                    builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            retrofit2.Call<ResponseBody> call = RetrofitUtils.getInstance().update(71,2,list.get(position).getOrderid());
                            call.enqueue(new retrofit2.Callback<ResponseBody>() {
                                @Override
                                public void onResponse(retrofit2.Call<ResponseBody> call, retrofit2.Response<ResponseBody> response) {
                                    presenter.DateOrder();
                                    notifyDataSetChanged();
                            }

                                @Override
                                public void onFailure(retrofit2.Call<ResponseBody> call, Throwable t) {

                                }
                            });
                        }
                    });

                    builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {

                        }
                    });
                    builder.show();

                }
            });

        }else if (list.get(position).getStatus()==1){
            ((MyViewHolder) holder).mDaizhifuText.setText("已支付");
            ((MyViewHolder) holder).mDaizhifuText.setTextColor(Color.BLACK);
            ((MyViewHolder) holder).mBtnText.setText("查看订单");
        }else if (list.get(position).getStatus()==2){
            ((MyViewHolder) holder).mDaizhifuText.setText("已取消");
            ((MyViewHolder) holder).mDaizhifuText.setTextColor(Color.BLACK);
            ((MyViewHolder) holder).mBtnText.setText("查看订单");
            ((MyViewHolder) holder).mBtnText.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    AlertDialog.Builder builder = new AlertDialog.Builder(context);
                    builder.setTitle("提示");
                    builder.setMessage("确定循环利用吗?");
                    builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            retrofit2.Call<ResponseBody> call = RetrofitUtils.getInstance().update(71,0,list.get(position).getOrderid());
                            call.enqueue(new retrofit2.Callback<ResponseBody>() {
                                @Override
                                public void onResponse(retrofit2.Call<ResponseBody> call, retrofit2.Response<ResponseBody> response) {
                                    presenter.DateOrder();
                                    notifyDataSetChanged();
                                }

                                @Override
                                public void onFailure(retrofit2.Call<ResponseBody> call, Throwable t) {

                                }
                            });
                        }
                    });

                    builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {

                        }
                    });
                    builder.show();
                }
            });

        }
    }

    @Override
    public int getItemCount() {
        if (list!=null){
            return list.size();
        }
        return 0;
    }

    class MyViewHolder extends RecyclerView.ViewHolder {
        TextView mTitleText;
        TextView mDaizhifuText;
        TextView mPriceText;
        TextView mTameText;
        TextView mBtnText;
        public MyViewHolder(View itemView) {
            super(itemView);
            mTitleText = (TextView) itemView.findViewById(R.id.text_title);
            mDaizhifuText = (TextView) itemView.findViewById(R.id.text_daizhifu);
            mPriceText = (TextView) itemView.findViewById(R.id.text_price);
            mTameText = (TextView) itemView.findViewById(R.id.text_tame);
            mBtnText = (TextView) itemView.findViewById(R.id.text_btn);
        }
    }
}

MyFrag适配器

public class MyFrag extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
    Context context;
    List<OrderBean.DataBean> list;
    OrderPresenter presenter;
    public MyFrag(Context context, List<OrderBean.DataBean> list, OrderPresenter presenter) {
        this.context = context;
        this.list = list;
        this.presenter = presenter;
    }
    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.daizhifu,parent, false);;
        MyViewHolder holder = new MyViewHolder(view);
        return holder;
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
        if (list.get(position).getStatus()==0){
            ((MyViewHolder)holder).ll.setVisibility(View.VISIBLE);
            ((MyViewHolder)holder).mTitleText.setText(list.get(position).getTitle());
            ((MyViewHolder)holder).mPriceText.setText("价格: "+list.get(position).getPrice());
            ((MyViewHolder)holder).mTameText.setText(list.get(position).getCreatetime());
            ((MyViewHolder) holder).mDaizhifuText.setText("待支付");
            ((MyViewHolder) holder).mDaizhifuText.setTextColor(Color.RED);
            ((MyViewHolder) holder).mBtnText.setText("取消订单");
            ((MyViewHolder) holder).mBtnText.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    AlertDialog.Builder builder = new AlertDialog.Builder(context);
                    builder.setTitle("提示");
                    builder.setMessage("确定要取消订单吗?");
                    builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            retrofit2.Call<ResponseBody> call = RetrofitUtils.getInstance().update(71,2,list.get(position).getOrderid());
                            call.enqueue(new retrofit2.Callback<ResponseBody>() {
                                @Override
                                public void onResponse(retrofit2.Call<ResponseBody> call, retrofit2.Response<ResponseBody> response) {
                                    presenter.DateOrder();
                                    notifyDataSetChanged();
                                }

                                @Override
                                public void onFailure(retrofit2.Call<ResponseBody> call, Throwable t) {

                                }
                            });
                        }
                    });

                    builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {

                        }
                    });
                    builder.show();

                }
            });
        }
    }

    @Override
    public int getItemCount() {
        if (list!=null){
            return list.size();
        }
        return 0;
    }
    class MyViewHolder extends RecyclerView.ViewHolder {
        TextView mTitleText;
        TextView mDaizhifuText;
        TextView mPriceText;
        TextView mTameText;
        TextView mBtnText;
        LinearLayout ll;
        public MyViewHolder(View itemView) {
            super(itemView);
            mTitleText = (TextView) itemView.findViewById(R.id.text_title);
            mDaizhifuText = (TextView) itemView.findViewById(R.id.text_daizhifu);
            mPriceText = (TextView) itemView.findViewById(R.id.text_price);
            mTameText = (TextView) itemView.findViewById(R.id.text_tame);
            mBtnText = (TextView) itemView.findViewById(R.id.text_btn);
            ll = itemView.findViewById(R.id.ll);
        }
    }
}

MyQx适配器

public class MyQx extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
    Context context;
    List<OrderBean.DataBean> list;
    OrderPresenter presenter;
    public MyQx(Context context, List<OrderBean.DataBean> list,OrderPresenter presenter) {
        this.context = context;
        this.list = list;
        this.presenter = presenter;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.qx_item,parent, false);;
        MyViewHolder holder = new MyViewHolder(view);
        return holder;
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
        if (list.get(position).getStatus()==2){
            ((MyViewHolder)holder).ll.setVisibility(View.VISIBLE);
            ((MyViewHolder)holder).mTitleText.setText(list.get(position).getTitle());
            ((MyViewHolder)holder).mPriceText.setText("价格: "+list.get(position).getPrice());
            ((MyViewHolder)holder).mTameText.setText(list.get(position).getCreatetime());
            ((MyViewHolder) holder).mDaizhifuText.setText("已取消");
            ((MyViewHolder) holder).mDaizhifuText.setTextColor(Color.BLACK);
            ((MyViewHolder) holder).mBtnText.setText("查看订单");
            ((MyViewHolder) holder).mBtnText.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    AlertDialog.Builder builder = new AlertDialog.Builder(context);
                    builder.setTitle("提示");
                    builder.setMessage("确定循环利用吗?");
                    builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            retrofit2.Call<ResponseBody> call = RetrofitUtils.getInstance().update(71,0,list.get(position).getOrderid());
                            call.enqueue(new retrofit2.Callback<ResponseBody>() {
                                @Override
                                public void onResponse(retrofit2.Call<ResponseBody> call, retrofit2.Response<ResponseBody> response) {
                                    presenter.DateOrder();
                                    notifyDataSetChanged();
                                }

                                @Override
                                public void onFailure(retrofit2.Call<ResponseBody> call, Throwable t) {

                                }
                            });
                        }
                    });

                    builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {

                        }
                    });
                    builder.show();
                }
            });

        }
    }

    @Override
    public int getItemCount() {
        if (list != null){
            return list.size();
        }
        return 0;
    }
    class MyViewHolder extends RecyclerView.ViewHolder {
        TextView mTitleText;
        TextView mDaizhifuText;
        TextView mPriceText;
        TextView mTameText;
        TextView mBtnText;
        LinearLayout ll;
        public MyViewHolder(View itemView) {
            super(itemView);
            mTitleText = (TextView) itemView.findViewById(R.id.text_title);
            mDaizhifuText = (TextView) itemView.findViewById(R.id.text_daizhifu);
            mPriceText = (TextView) itemView.findViewById(R.id.text_price);
            mTameText = (TextView) itemView.findViewById(R.id.text_tame);
            mBtnText = (TextView) itemView.findViewById(R.id.text_btn);
            ll = itemView.findViewById(R.id.ll);
        }
    }
}

MyZf适配器

public class MyZf extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
    Context context;
    List<OrderBean.DataBean> list;
    private List<String> stringList;


    public MyZf(Context context, List<OrderBean.DataBean> list) {
        this.context = context;
        this.list = list;

    }
    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.yizhifu,parent, false);;
        MyViewHolder holder = new MyViewHolder(view);
        return holder;
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
        stringList = new ArrayList<>();
        if (list.get(position).getStatus()==1){

//            stringList.add(list.get(position).getTitle());
//
//            System.out.println("****"+stringList.size());



            ((MyViewHolder)holder).ll.setVisibility(View.VISIBLE);
            ((MyViewHolder)holder).mTitleText.setText(list.get(position).getTitle());
            ((MyViewHolder)holder).mPriceText.setText("价格: "+list.get(position).getPrice());
            ((MyViewHolder)holder).mTameText.setText(list.get(position).getCreatetime());
            ((MyViewHolder) holder).mDaizhifuText.setText("已支付");
            ((MyViewHolder) holder).mDaizhifuText.setTextColor(Color.BLACK);
            ((MyViewHolder) holder).mBtnText.setText("查看订单");
        }
    }

    @Override
    public int getItemCount() {
        if (list != null){
            return list.size();
        }
        return 0;
    }
    class MyViewHolder extends RecyclerView.ViewHolder {
        TextView mTitleText;
        TextView mDaizhifuText;
        TextView mPriceText;
        TextView mTameText;
        TextView mBtnText;
        LinearLayout ll;
        public MyViewHolder(View itemView) {
            super(itemView);
            mTitleText = (TextView) itemView.findViewById(R.id.text_title);
            mDaizhifuText = (TextView) itemView.findViewById(R.id.text_daizhifu);
            mPriceText = (TextView) itemView.findViewById(R.id.text_price);
            mTameText = (TextView) itemView.findViewById(R.id.text_tame);
            mBtnText = (TextView) itemView.findViewById(R.id.text_btn);
            ll = itemView.findViewById(R.id.ll);
        }
    }
}

Fragment基类

public abstract class BaseFragment<T extends IPreesenter> extends Fragment {
    T presenter;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        createpresenter();
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    protected abstract void createpresenter();

    @Override
    public void onDestroy() {
        super.onDestroy();
        if (presenter != null){
            presenter.deach();
        }
    }
}

Fragment1类

public class Fragment_1 extends BaseFragment<OrderPresenter> implements IOrderView {
    private RecyclerView mRecy;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        super.onCreateView(inflater, container, savedInstanceState);
        View view = View.inflate(getActivity(), R.layout.fragment_1, null);
        mRecy = (RecyclerView)view.findViewById(R.id.recy);
        presenter.DateOrder();
        return view;
    }

    @Override
    public void showOrder(List<OrderBean.DataBean> list) {
        LinearLayoutManager mgs = new LinearLayoutManager(getActivity());
        mRecy.setLayoutManager(mgs);
        MyAdapter adapter = new MyAdapter(getActivity(),list,presenter);
        mRecy.setAdapter(adapter);
    }

    @Override
    protected void createpresenter() {
        presenter = new OrderPresenter(this);
    }
}

Fragment2类

public class Fragment_2 extends BaseFragment<OrderPresenter> implements IOrderView {
    RecyclerView recy;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        super.onCreateView(inflater, container, savedInstanceState);
        View view = View.inflate(getActivity(), R.layout.fragment_2,null);
        recy = view.findViewById(R.id.recy);
        presenter.DateOrder();
        return view;
    }

    @Override
    protected void createpresenter() {
        presenter = new OrderPresenter(this);
    }

    @Override
    public void showOrder(List<OrderBean.DataBean> list) {
        LinearLayoutManager mgs = new LinearLayoutManager(getActivity());
        recy.setLayoutManager(mgs);
        MyFrag adapter = new MyFrag(getActivity(),list,presenter);
        recy.setAdapter(adapter);
    }
}

Fragment3类

public class Fragment_3 extends BaseFragment<OrderPresenter> implements IOrderView {
    RecyclerView recyclerView;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        super.onCreateView(inflater, container, savedInstanceState);
        View view = View.inflate(getActivity(), R.layout.fragment_3,null);
        recyclerView = view.findViewById(R.id.re);
        presenter.DateOrder();
        return view;
    }

    @Override
    public void showOrder(List<OrderBean.DataBean> list) {
        LinearLayoutManager mgs = new LinearLayoutManager(getActivity());
        recyclerView.setLayoutManager(mgs);
        MyQx adapter = new MyQx(getActivity(),list,presenter);
        recyclerView.setAdapter(adapter);
    }

    @Override
    protected void createpresenter() {
        presenter = new OrderPresenter(this);
    }
}

Fragment4类

public class Fragment_4 extends BaseFragment<OrderPresenter> implements IOrderView {
    RecyclerView rv;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        super.onCreateView(inflater, container, savedInstanceState);
        View view = View.inflate(getActivity(), R.layout.fragment_4,null);
        presenter.DateOrder();
        rv = view.findViewById(R.id.rv);
        return view;
    }

    @Override
    protected void createpresenter() {
        presenter = new OrderPresenter(this);
    }

    @Override
    public void showOrder(List<OrderBean.DataBean> list) {
        LinearLayoutManager mgs = new LinearLayoutManager(getActivity());
        rv.setLayoutManager(mgs);
        MyZf adapter = new MyZf(getActivity(),list);
        rv.setAdapter(adapter);
    }
}

MainAtivity主方法类

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private RadioGroup radioGroup;
    private RadioButton button_1;
    private RadioButton button_2;
    private RadioButton button_3;
    private RadioButton button_4;
    private Fragment_1 fragment_1;
    private Fragment_2 fragment_2;
    private Fragment_3 fragment_3;
    private Fragment_4 fragment_4;
    private List<Fragment> list;
    private FrameLayout frameLayout;
    private ImageView mBtnImage;
    private View item_popup;
    private PopupWindow popupWindow;
    private View view;
    private TextView btn_daizhi;
    private TextView btn_yizhi;
    private TextView btn_yiqu;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        frameLayout = (FrameLayout) findViewById(R.id.framelayout);
        radioGroup = (RadioGroup) findViewById(R.id.radioGroup);

        //找到四个按钮
        button_1 = (RadioButton) findViewById(R.id.button_1);
        button_2 = (RadioButton) findViewById(R.id.button_2);
        button_3 = (RadioButton) findViewById(R.id.button_3);
        button_4 = (RadioButton) findViewById(R.id.button_4);

        //创建Fragment对象及集合
        fragment_1 = new Fragment_1();
        fragment_2 = new Fragment_2();
        fragment_3 = new Fragment_3();
        fragment_4 = new Fragment_4();

        //将Fragment对象添加到list中
        list = new ArrayList<>();
        list.add(fragment_1);
        list.add(fragment_2);
        list.add(fragment_3);
        list.add(fragment_4);

        //设置RadioGroup开始时设置的按钮,设置第一个按钮为默认值
        radioGroup.check(R.id.button_1);


        //设置按钮点击监听
        button_1.setOnClickListener(this);
        button_2.setOnClickListener(this);
        button_3.setOnClickListener(this);
        button_4.setOnClickListener(this);

        //初始时向容器中添加第一个Fragment对象
        addFragment(fragment_1);

        mBtnImage = (ImageView) findViewById(R.id.image_btn);
        mBtnImage.setOnClickListener(this);
        item_popup = View.inflate(this, R.layout.item_popup, null);
        view = View.inflate(this, R.layout.activity_main, null);
        popupWindow = new PopupWindow(item_popup, ActionBar.LayoutParams.WRAP_CONTENT,ActionBar.LayoutParams.WRAP_CONTENT);
        popupWindow.setTouchable(true);

        btn_daizhi = item_popup.findViewById(R.id.btn_daizhi);
        btn_yizhi = item_popup.findViewById(R.id.btn_yizhi);
        btn_yiqu = item_popup.findViewById(R.id.btn_yiqu);
        btn_daizhi.setOnClickListener(this);
        btn_yizhi.setOnClickListener(this);
        btn_yiqu.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        //我们根据参数的id区别不同按钮
        //不同按钮对应着不同的Fragment对象页面
        switch (v.getId()) {
            case R.id.button_1:
                addFragment(fragment_1);
                break;
            case R.id.button_2:
                addFragment(fragment_2);
                break;
            case R.id.button_3:
                addFragment(fragment_3);
                break;
            case R.id.button_4:
                addFragment(fragment_4);
                break;
            case R.id.image_btn:
                popupWindow.showAsDropDown(mBtnImage);
                break;
            case R.id.btn_daizhi:
                addFragment(fragment_2);
                popupWindow.dismiss();
                break;
            case R.id.btn_yizhi:
                addFragment(fragment_4);
                popupWindow.dismiss();
                break;
            case R.id.btn_yiqu:
                addFragment(fragment_3);
                popupWindow.dismiss();
                break;
            default:
                break;
        }

    }

    //向Activity中添加Fragment的方法
    public void addFragment(Fragment fragment) {

        //获得Fragment管理器
        FragmentManager fragmentManager = getSupportFragmentManager();
        //使用管理器开启事务
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
        //使用事务替换Fragment容器中Fragment对象
        fragmentTransaction.replace(R.id.framelayout, fragment);
        //提交事务,否则事务不生效
        fragmentTransaction.commit();
    }
}

主页面布局

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.miaoxinrikao0116.MainActivity">
    <RelativeLayout
        android:id="@+id/rl"
        android:background="#fff"
        android:layout_width="match_parent"
        android:layout_height="50dp">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:textSize="20sp"
            android:text="订单列表"/>
        <ImageView
            android:id="@+id/image_btn"
            android:layout_width="25dp"
            android:layout_height="25dp"
            android:clickable="true"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_marginRight="20dp"
            android:background="@drawable/lv_icon"/>
    </RelativeLayout>


    <!--最下边为RadioGroup-->
    <RadioGroup
        android:layout_below="@+id/rl"
        android:id="@+id/radioGroup"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <!--第一个RadioButton-->
        <RadioButton
            android:id="@+id/button_1"
            android:text="全部"
            android:button="@null"
            android:gravity="center"
            android:layout_weight="1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <!--第二个RadioButton-->
        <RadioButton
            android:id="@+id/button_2"
            android:text="待支付"
            android:button="@null"
            android:gravity="center"
            android:layout_weight="1"

            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <!--第三个RadioButton-->
        <RadioButton
            android:id="@+id/button_3"
            android:text="已取消"
            android:button="@null"
            android:gravity="center"
            android:layout_weight="1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <!--第四个RadioButton-->
        <RadioButton
            android:id="@+id/button_4"
            android:text="已支付"
            android:button="@null"
            android:gravity="center"
            android:layout_weight="1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

    </RadioGroup>
    <FrameLayout
        android:id="@+id/framelayout"
        android:layout_below="@+id/radioGroup"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />
</RelativeLayout>

待支付布局(daizhifu.xml)

   <LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:visibility="gone"
        android:id="@+id/ll">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:orientation="horizontal">
        <TextView
            android:id="@+id/text_title"
            android:layout_width="0dp"
            android:layout_weight="2"
            android:gravity="bottom"
            android:layout_height="match_parent"
            android:text="1111"/>
        <TextView
            android:id="@+id/text_daizhifu"
            android:layout_width="50dp"
            android:gravity="bottom"
            android:layout_height="match_parent"
            android:textColor="#ff0000"
            android:text="待支付"/>
    </LinearLayout>
    <TextView
        android:id="@+id/text_price"
        android:gravity="bottom"
        android:textColor="#ff0000"
        android:layout_marginLeft="20dp"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:text="1111"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:orientation="horizontal">
        <TextView
            android:id="@+id/text_tame"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:gravity="bottom"
            android:layout_height="match_parent"
            android:text="1111"/>
        <TextView
            android:id="@+id/text_btn"
            android:layout_width="70dp"
            android:gravity="center"
            android:layout_gravity="bottom"
            android:layout_height="30dp"
            android:text="取消订单"/>
    </LinearLayout>
    <TextView
        android:layout_marginTop="15dp"
        android:clickable="true"
        android:focusable="false"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="#9999"/>
    </LinearLayout>
</LinearLayout>


item_popup.xmL布局

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:layout_width="100dp"
        android:background="#ffffff"
        android:layout_height="wrap_content"

        android:orientation="vertical">
        <TextView
            android:id="@+id/btn_daizhi"
            android:layout_width="match_parent"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="0dp"
            android:textSize="16sp"
            android:padding="15dp"
            android:text="待支付"/>
        <TextView
            android:id="@+id/btn_yizhi"
            android:layout_width="match_parent"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="0dp"
            android:textSize="16sp"
            android:padding="15dp"
            android:text="已支付"/>
        <TextView
            android:id="@+id/btn_yiqu"
            android:layout_width="match_parent"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="0dp"
            android:textSize="16sp"
            android:padding="15dp"
            android:text="已取消"/>
    </LinearLayout>
</RelativeLayout>

qb_item布局

<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:orientation="horizontal">
        <TextView
            android:id="@+id/text_title"
            android:layout_width="0dp"
            android:layout_weight="2"
            android:gravity="bottom"
            android:layout_height="match_parent"
            android:text="1111"/>
        <TextView
            android:id="@+id/text_daizhifu"
            android:layout_width="50dp"
            android:gravity="bottom"
            android:layout_height="match_parent"
            android:textColor="#ff0000"
            android:text="待支付"/>
    </LinearLayout>
    <TextView
        android:id="@+id/text_price"
        android:gravity="bottom"
        android:textColor="#ff0000"
        android:layout_marginLeft="20dp"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:text="1111"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:orientation="horizontal">
        <TextView
            android:id="@+id/text_tame"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:gravity="bottom"
            android:layout_height="match_parent"
            android:text="1111"/>
        <TextView
            android:id="@+id/text_btn"
            android:layout_width="70dp"
            android:gravity="center"
            android:layout_gravity="bottom"
            android:layout_height="30dp"
            android:text="取消订单"/>
    </LinearLayout>
    <TextView
        android:layout_marginTop="15dp"
        android:clickable="true"
        android:focusable="false"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="#9999"/>

</LinearLayout>

qx_item布局

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:visibility="gone"
        android:id="@+id/ll">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:orientation="horizontal">
            <TextView
                android:id="@+id/text_title"
                android:layout_width="0dp"
                android:layout_weight="2"
                android:gravity="bottom"
                android:layout_height="match_parent"
                android:text="1111"/>
            <TextView
                android:id="@+id/text_daizhifu"
                android:layout_width="50dp"
                android:gravity="bottom"
                android:layout_height="match_parent"
                android:textColor="#ff0000"
                android:text="待支付"/>
        </LinearLayout>
        <TextView
            android:id="@+id/text_price"
            android:gravity="bottom"
            android:textColor="#ff0000"
            android:layout_marginLeft="20dp"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:text="1111"/>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:orientation="horizontal">
            <TextView
                android:id="@+id/text_tame"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:gravity="bottom"
                android:layout_height="match_parent"
                android:text="1111"/>
            <TextView
                android:id="@+id/text_btn"
                android:layout_width="70dp"
                android:gravity="center"
                android:layout_gravity="bottom"
                android:layout_height="30dp"
                android:text="取消订单"/>
        </LinearLayout>
        <TextView
            android:layout_marginTop="15dp"
            android:clickable="true"
            android:focusable="false"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="#9999"/>
    </LinearLayout>

</LinearLayout>

yizhifu.xml布局

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:visibility="visible"

    android:layout_height="wrap_content">

    <LinearLayout
        android:id="@+id/ll"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:visibility="gone">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:orientation="horizontal">
            <TextView
                android:id="@+id/text_title"
                android:layout_width="0dp"
                android:layout_weight="2"
                android:gravity="bottom"
                android:layout_height="match_parent"
                android:text="1111"/>
            <TextView
                android:id="@+id/text_daizhifu"
                android:layout_width="50dp"
                android:gravity="bottom"
                android:layout_height="match_parent"
                android:textColor="#ff0000"
                android:text="待支付"/>
        </LinearLayout>
        <TextView
            android:id="@+id/text_price"
            android:gravity="bottom"
            android:textColor="#ff0000"
            android:layout_marginLeft="20dp"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:text="1111"/>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:orientation="horizontal">
            <TextView
                android:id="@+id/text_tame"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:gravity="bottom"
                android:layout_height="match_parent"
                android:text="1111"/>
            <TextView
                android:id="@+id/text_btn"
                android:layout_width="70dp"
                android:gravity="center"
                android:layout_gravity="bottom"
                android:layout_height="30dp"
                android:text="取消订单"/>
        </LinearLayout>
        <TextView
            android:layout_marginTop="15dp"
            android:clickable="true"
            android:focusable="false"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="#9999"/>
    </LinearLayout>
</LinearLayout>

购物车与商城订单的关系以及技术实现深入分析 本站所有文章均为原创,欢迎转载,来源:技术小树懒(www.drw1314.com),作者:锦焕同学 接触商城开发已经有一段时间了,我们从B2C拼团项目做到了C2C视频电商系统。虽然项目都还不算成功,但还是积累了些业务经验,希望可以对大家有用。其实商城最主要的还是订单相关逻辑,例如购物车,下单,改价等。当然,电商还有一些比较麻烦的一些业务,例如sku,运费的合理计算,这不属于我们讨论的范围,今 阅读详情

相关推荐

第10章 购物车、订单功能实现

基于MongoDB实现mini商城的购物车功能,基于Zookeeper分布式锁解决mini商城下单过程中的超卖问题

Eclipse_2019的博客 374

商品和订单的er图_ER建模

ER实体关系模型 ER实体关系型(Entity-Relationship)是数据哭设计的理论基础,当前几乎所有的OLTP系统设计都采用ER模型建的方式,这种建模方式基于三范式。在信息系统中,将事物抽象分为“实体,“属性”,“关系”来标傲世数据关联和事物描述。 实体(Entity):实体是一个数据对象,指应用中可以区别的客观存在的事物。例如:商品、用户、学生、课程等。它具有自...

weixin_39738755的博客 2万+

14、购物车与订单处理的技术实现与优化

本文详细介绍了购物车与订单处理功能的技术实现与优化过程。通过使用Ajax技术,增强了购物车的交互体验,包括高亮显示最新添加的商品、平滑显示与隐藏购物车等功能。在订单处理部分,实现了订单表单的创建、验证与保存逻辑,并通过集成测试与单元测试确保功能的稳定性。同时,对订单处理进行了性能优化,如数据库索引添加、批量操作和缓存机制。文章最后总结了整个实现流程,并展望了未来的扩展方向。

cicd6pipeline的博客 72

[MySQL进阶]——ER模型

ER模型也叫作**实体关系模型**,是用来描述现实生活中客观存在的事物、事物的属性,以及事物之间关系的一种数据模型。**在开发基于数据库的信息系统的设计阶段,通常使用ER模型来描述信息需求和信息特性,帮助我们理清业务逻辑,从而设计出优秀的数据库**

热爱编程的机械生的救赎 1万+

PHP电商系统购物车与订单队列实现Demo

购物车系统的核心功能包括:添加商品、删除商品、修改商品数量、查看购物车内容以及清空购物车。这些操作构成了用户在电商平台上的主要交互流程。购物车的业务逻辑需满足以下基本要求:商品唯一性:同一商品在购物车中应唯一存在,避免重复添加。数量控制:用户可调整商品数量,并需限制最小和最大购买数量。价格计算:根据商品单价与数量自动计算总价。库存同步:购物车中商品库存应与数据库保持一致,避免超卖。会话管理:购物车数据需绑定用户会话,支持登录与未登录状态下的数据保留。

weixin_42186387的博客 999

商品与会员ER图

一个简单的ER图工具,以及商品与会员的ER图关系

数据库设计-ER图

数据库设计-ER图

weixin_52385232的博客 3956

仿美团商品列表展示购物车

仿美团商品列表显示 左边显示种类、右边显示种类中的详细 选中后加入购物车、可以清空购物车

数据库设计——新零售

E-R图 可以使用“亿图图示”绘制 E-R图三要素 1.实体 —用矩形表示 2.属性 —用椭圆表示 3.实体之间的联系 —用菱形表示 E-R图的建立方法 先确定实体和联系,再确定实体和联系的属性,最后在唯一标识符下面画上下划线。 实体之间的联系 1.一对一 2.一对多 多对多 学生ID和课程ID是多对多的关系,可以建立一张关系表。 ............................................................

weixin_36504541的博客 4364

购物车系统接口

笔记中记录了项目04的具体实现步骤,可以作为开发文档使用

PID调参避坑指南:为什么你的电机总是震荡?从比例带积分到微分实战解析

本文针对电机控制中常见的震荡问题,提供了一份PID调参实战指南。文章深入解析了比例(P)、积分(I)、微分(D)三个参数对系统稳定性的影响,揭示了比例增益过大是导致震荡的关键原因之一,并给出了从纯比例调试到引入积分、微分的系统化调参流程与避坑要点,帮助工程师快速实现电机平稳、精准的控制。

weixin_28223453的博客 456

E-R实体关系图

若社区蔬菜团购网站还兼有代收快递的业务,请增加新的“快递”实体,并给出客户实体和快递实体之间的“收取”联系,对图2-1进行补充。“快递” 关系模式包括快递编号、客户电话和日期。(a):团购点编号。主键为:(供货商编号,团购点编号),外键为:供货商编号,团购点编号。主键为:订单编号,外键为:团购点编号,客户电话。补充逻辑结构设计结果中的(a)、(b)两处空缺及完整性约束关系。根据问题描述,补充图2-1的实体联系图。描述显示世界的概念模型。【问题2】 (4分)

survival_game的博客 2171

洛奇 服务器文件,MabinogiG20S2 [洛奇G20服务端]

Code:Titles:>set_title /id: /add /remove Parameters for titles>set_title /id:60001 /add add devcat title>set_title /id:60001 /remove remove devcat title===========================...

weixin_30813385的博客 4301

php实现我的购物以及订单,实现简单的php购物车代码

这里我们为你提供个简单的php购物车代码,从增加购物产品与发生购买了,在商城开发中,这个功能是少不了的具体分析如下:对购物车里商品的操作大体上有以下几个:添加商品,删除商品,以及提交订单;方法本质是:把session存入array,对array进行增加、删除、修改操作,array中的每一组记录都是一个商品的信息(个数,价格等);解决购物车的思路是用session记录一个二维数组。一维代表每一个商品...

weixin_35389904的博客 1932

C# emgu.cv图像识别 从大图中寻找小图,判断存在图的相似度

这是2个问题,我采用emgu.cv来解决这个识别问题,这里需要在nuget中引用emgu。最近写了一个在一张图片中,截取一部分,通过机器判断截取图片是这张图片的。第一、通过小图去找判断是否存在大图中,第二、小图存在大图的什么位置。

一个专注于技术研究创新的程序员 2467

三维(点云)语义分割概述以及方法总结

语义分割 语义分割需要两部分 classification: 需要全局信息 segmentation:更加依赖全局信息和局部信息 一般的网络结构是: 提特征-特征映射-特征图压缩(降维)-全连接-分类,其实就是encoder-decoder的过程, 比如在二维的的pspnet,fcn等等 0. 三维表示的数据结构 Point cloud 无序性 点云实际上是无序的,比如有8个点云,你放到...

renhaofan的博客 3万+

带你逐步深入了解SSM框架——淘淘商城项目之购物车+订单实现

1   今日大纲 1、  实现淘淘商城的购物车功能 2、  实现订单系统。 2   购物车功能 2.1  功能说明 1、商品加入购物车时,不是必须要求登录。 2、计算购物车中商品的总价。当商品数量发生变化时需要重新计算。 3、用户可以删除购物车中的商品。 4、用户下单后,删除购物车的功能。 2.2  功能分析 1、在用户不登陆的清空下也可以使用购物车,那么就需要把购物车信息放入

宇翔XGT的博客 1万+

非sudo用户如何安全使用Docker:Rootless模式实战指南

Docker Rootless模式是一种基于Linux用户命名空间(userns)的容器运行时安全机制,它通过UID/GID映射、fuse-overlayfs文件系统和slirp4netns网络栈,在不提升权限的前提下实现容器隔离。其核心原理是将容器内root身份映射为宿主机非特权用户,从而规避docker组等价root的安全风险。相比传统root模式,Rootless在权限控制、逃逸防护和多租户隔离方面具备天然优势,适用于CI/CD流水线、Kubernetes边缘节点及受限生产环境。本文聚焦无sudo权限

weixin_30274627的博客 348

JavaWeb购物系统(六)购物车订单模块的实现

功能 1. 生成订单 2. 订单页的展示 3. 查看订单详情

喃灬疯的博客 6731

Python | 集合(set)运算之intersection()

简介 在做力扣题的时候,有一个思路是要求解两个字符串的交集。 一般来说,求解交集的思路是遍历两个字符串,判断有无相等,有相等则添加到交集中,直到循环结束。 但是这样做,会增加很多的不必要的遍历:比如说,当一个字符串中有多个相同的元素时,该元素会被遍历多次。 因此,在求解时,我们可以先将字符串转换为set集合类型。集合中存储的元素没有顺序,且互异(即元素不可重复)。 算例 求字符串m“abcdaaa” 与 字符串n“bcddses”是否存在交集 首先将字符串转换为set类型: m = set(m) n

lovetaozibaby的博客 1万+

el-upload自定义上传dwg/dxf文件并且携带额外参数(CAD)

需求:需要使用el-upload自定义上传cad的图片或普通图片,这边需要判断区分下,以及上传后清空上传文件列表。

请叫我欧皇!的博客 1535

黑马淘淘商城第十二天 购物车实现、订单确认页面展示

1. 课程计划 第十二天: 1、购物车实现 2、订单确认页面展示 2. 购物车的实现 2.1. 功能分析 1、购物车是一个独立的表现层工程。 2、添加购物车不要求登录。可以指定购买商品的数量。 3、展示购物车列表页面 4、修改购物车商品数量 5、删除购物车商品 2.2. 工程搭建 Taotao-cart-web打包方式war 可以参考taotao-portal-web 2.2.1. Pom文件 <project xmlns="http://maven.apache.org/POM/4.0.0" xm

qq_17023977的博客 1502

基于 Mask R-CNN 的实例分割:从零开始构建一个强大的分割模型

在本文中,我们将介绍如何使用 Mask R-CNN(Region-based Convolutional Networks with Masks)实现实例分割。实例分割是计算机视觉中的一种任务,旨在识别并分割图像中的各个对象。我们将讨论如何准备数据集、配置 Mask R-CNN 模型并在自定义数据集上进行训练。

斌擎科技 1243

蚊子的项目整合笔记(二) - 购物车、订单实现

购物车实现 商品数量修改 406报错 特点:页面解析异常,页面要求解析的是.html页面,但是回传的数据是JSON串.这时解析发生异常.报错406 解决: <servlet-mapping> <servlet-name>springmvc-web</servlet-name> <url-pattern>*.html</url-patt...

weixin_38571165的博客 357

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

利用MVP实现购物车提交订单

效果图如下: 技术要求: MVP,okhttp二次封装,单例模式,图片加载:imageLoader/glide/picaso,recyclerView展示数据,自定义条目点击事件,上拉加载和下拉刷新控件的使用,购物车,订单,TabLayout 所需要的依赖:     compile 'com.squareup.okhttp3:okhttp:3.9.0'    

wq857260622的博客 801

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

上一篇: ProgressBar水平进度条设置
下一篇: 登录注册
Key_p
博客等级 码龄9年 7粉丝 23原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值