1
This commit is contained in:
18
.idea/codeStyles/Project.xml
generated
18
.idea/codeStyles/Project.xml
generated
@@ -24,6 +24,24 @@
|
||||
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
|
||||
</formatting-settings>
|
||||
</DBN-SQL>
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
<package name="java.util" alias="false" withSubpackages="false" />
|
||||
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
|
||||
<package name="io.ktor" alias="false" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="PACKAGES_IMPORT_LAYOUT">
|
||||
<value>
|
||||
<package name="" alias="false" withSubpackages="true" />
|
||||
<package name="java" alias="false" withSubpackages="true" />
|
||||
<package name="javax" alias="false" withSubpackages="true" />
|
||||
<package name="kotlin" alias="false" withSubpackages="true" />
|
||||
<package name="" alias="true" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
</JetCodeStyleSettings>
|
||||
<DBN-PSQL>
|
||||
<case-options enabled="true">
|
||||
<option name="KEYWORD_CASE" value="lower" />
|
||||
|
||||
@@ -137,7 +137,7 @@ android {
|
||||
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0' //1.0.5及以前版本的老用户升级需谨慎,API改动过大
|
||||
// 基础依赖包,必须要依赖
|
||||
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
|
||||
|
||||
implementation 'liji.library.dev:citypickerview:5.2.2'
|
||||
|
||||
// implementation 'com.zhihu.android:matisse:0.5.3-beta3'
|
||||
}
|
||||
|
||||
@@ -284,6 +284,10 @@
|
||||
<activity android:name=".discovery.ImageViewerAndDeleteActivity" />
|
||||
<activity android:name=".discovery.AddDiscoveryActivity" />
|
||||
<activity android:name=".cart.AddressListActivity" />
|
||||
<activity android:name=".cart.AddAddressActivity" />
|
||||
<activity android:name=".order.OrderActivity" />
|
||||
<activity android:name=".order.OrderDetailActivity" />
|
||||
<activity android:name=".order.SettleActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -17,6 +17,7 @@ import com.cutil.StringUtils;
|
||||
import com.sl.house_property.cart.AddressListActivity;
|
||||
import com.sl.house_property.databinding.FragmentMain4Binding;
|
||||
import com.sl.house_property.f1.UserdlistActivity;
|
||||
import com.sl.house_property.order.OrderActivity;
|
||||
import com.sl.house_property.user.MyAuthorizedFamilyHistory;
|
||||
import com.sl.house_property.user.MyBillHistory;
|
||||
import com.sl.house_property.user.MyGuaranteeHistory;
|
||||
@@ -190,6 +191,60 @@ public class Main4Fragment extends BaseFragment<FragmentMain4Binding> {
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.tvOrder1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getActivity(), OrderActivity.class);
|
||||
intent.putExtra("type", 1);
|
||||
intent.putExtra("orderType", 1);
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.tvOrder2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getActivity(), OrderActivity.class);
|
||||
intent.putExtra("type", 1);
|
||||
intent.putExtra("orderType", 2);
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.tvOrder3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getActivity(), OrderActivity.class);
|
||||
intent.putExtra("type", 1);
|
||||
intent.putExtra("orderType", 3);
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.tvOrder4.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getActivity(), OrderActivity.class);
|
||||
intent.putExtra("type", 2);
|
||||
intent.putExtra("orderType", 1);
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.tvOrder5.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getActivity(), OrderActivity.class);
|
||||
intent.putExtra("type", 2);
|
||||
intent.putExtra("orderType", 2);
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.tvOrder6.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getActivity(), OrderActivity.class);
|
||||
intent.putExtra("type", 2);
|
||||
intent.putExtra("orderType", 3);
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// private void initMyReycyView() {
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.sl.house_property.cart;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.lljjcoder.Interface.OnCityItemClickListener;
|
||||
import com.lljjcoder.bean.CityBean;
|
||||
import com.lljjcoder.bean.DistrictBean;
|
||||
import com.lljjcoder.bean.ProvinceBean;
|
||||
import com.lljjcoder.style.cityjd.JDCityConfig;
|
||||
import com.lljjcoder.style.cityjd.JDCityPicker;
|
||||
import com.sl.house_property.BaseActivity;
|
||||
import com.sl.house_property.R;
|
||||
import com.sl.house_property.databinding.ActivityAddAddressBinding;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import entity.RegisterUser;
|
||||
import http.ApiConfig;
|
||||
import my_loader.Loader;
|
||||
import my_loader.Resultcode;
|
||||
import rx.functions.Action1;
|
||||
import tools.Config;
|
||||
import utils.Md5;
|
||||
|
||||
public class AddAddressActivity extends BaseActivity<ActivityAddAddressBinding> {
|
||||
private ProgressDialog progressDialog;
|
||||
private Context context;
|
||||
private String area = "";
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
return R.layout.activity_add_address;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.keyboardEnable(true) //解决软键盘与底部输入框冲突问题
|
||||
// .keyboardEnable(true, WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE
|
||||
// | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) //软键盘自动弹出
|
||||
//.barColor(R.color.colorPrimary)
|
||||
.init();
|
||||
context = this;
|
||||
mDataBinding.left.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
progressDialog = new ProgressDialog(this);
|
||||
mDataBinding.tvArea.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
select();
|
||||
}
|
||||
});
|
||||
mDataBinding.btnSubmit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loader loader = new Loader();
|
||||
|
||||
private void submit() {
|
||||
String name = mDataBinding.etName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
setToast(1, "请输入收货人姓名");
|
||||
return;
|
||||
}
|
||||
String phone = mDataBinding.etPhone.getText().toString().trim();
|
||||
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
setToast(1, "请输入手机号码");
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(area)) {
|
||||
setToast(1, "请选择地区");
|
||||
return;
|
||||
}
|
||||
String detail = mDataBinding.etDetail.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(detail)) {
|
||||
setToast(1, "请输入详细地址");
|
||||
return;
|
||||
}
|
||||
progressDialog.setMessage("提交中");
|
||||
progressDialog.show();
|
||||
RegisterUser user =
|
||||
Config.getInstance(context).getUser();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (user != null) {
|
||||
map.put("userid", user.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
map.put("app", "Order");
|
||||
map.put("class", "UserAddressAdd");
|
||||
map.put("name", name);
|
||||
map.put("mobile", phone);
|
||||
map.put("address", area + detail);
|
||||
map.put("sign", Md5.md5("Order" + "UserAddressAdd" + Md5.secret));
|
||||
|
||||
loader.getMovie(ApiConfig.BASE_URL, map)
|
||||
.subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
progressDialog.dismiss();
|
||||
if (resultcode.status == 0) {
|
||||
Toast.makeText(context, "提交成功", Toast.LENGTH_SHORT).show();
|
||||
setResult(200);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
progressDialog.dismiss();
|
||||
throwable.fillInStackTrace();
|
||||
Toast.makeText(context, "提交失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void select() {
|
||||
JDCityPicker cityPicker = new JDCityPicker();
|
||||
JDCityConfig jdCityConfig = new JDCityConfig.Builder().build();
|
||||
|
||||
jdCityConfig.setShowType(JDCityConfig.ShowType.PRO_CITY_DIS);
|
||||
cityPicker.init(this);
|
||||
cityPicker.setConfig(jdCityConfig);
|
||||
cityPicker.setOnCityItemClickListener(new OnCityItemClickListener() {
|
||||
@Override
|
||||
public void onSelected(ProvinceBean province, CityBean city, DistrictBean district) {
|
||||
area = province.getName() + city.getName() + district.getName();
|
||||
mDataBinding.tvArea.setText(area);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
}
|
||||
});
|
||||
cityPicker.showCityPicker();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.sl.house_property.cart;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
@@ -60,6 +61,12 @@ public class AddressListActivity extends BaseActivity<ActivityAddressListBinding
|
||||
// .keyboardEnable(true, WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE
|
||||
// | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) //软键盘自动弹出
|
||||
.init();
|
||||
mDataBinding.left.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
progressDialog = new ProgressDialog(this);
|
||||
initRec();
|
||||
mDataBinding.dw.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@@ -75,7 +82,12 @@ public class AddressListActivity extends BaseActivity<ActivityAddressListBinding
|
||||
}
|
||||
});
|
||||
mDataBinding.dw.autoRefresh();
|
||||
|
||||
mDataBinding.tvManager.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivityForResult(new Intent(context, AddAddressActivity.class), 13);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initRec() {
|
||||
@@ -102,7 +114,7 @@ public class AddressListActivity extends BaseActivity<ActivityAddressListBinding
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
|
||||
opera(addressEntity.getConsignee_id(), "1");
|
||||
opera(addressEntity.getConsignee_id(), "1");
|
||||
|
||||
}
|
||||
}).show();
|
||||
@@ -239,4 +251,13 @@ public class AddressListActivity extends BaseActivity<ActivityAddressListBinding
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 13 && resultCode == 200) {
|
||||
page = 1;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
383
app/src/main/java/com/sl/house_property/order/OrderActivity.java
Normal file
383
app/src/main/java/com/sl/house_property/order/OrderActivity.java
Normal file
@@ -0,0 +1,383 @@
|
||||
package com.sl.house_property.order;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.view.View;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.internal.LinkedTreeMap;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
||||
import com.lxj.xpopup.interfaces.OnInputConfirmListener;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.sl.house_property.BaseActivity;
|
||||
import com.sl.house_property.R;
|
||||
import com.sl.house_property.databinding.ActivityOrderBinding;
|
||||
import com.sl.house_property.databinding.ItemOrderBinding;
|
||||
import com.sl.house_property.databinding.ItemOrderItemBinding;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import adapter.BaseRecycleViewAdapter;
|
||||
import entity.OrderListBean;
|
||||
import entity.RegisterUser;
|
||||
import http.ApiConfig;
|
||||
import my_loader.Loader;
|
||||
import my_loader.Resultcode;
|
||||
import rx.functions.Action1;
|
||||
import tools.Config;
|
||||
import utils.Md5;
|
||||
|
||||
public class OrderActivity extends BaseActivity<ActivityOrderBinding> {
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
return R.layout.activity_order;
|
||||
}
|
||||
|
||||
private int type = -1;
|
||||
private int page = 1;
|
||||
private int orderType = -1;
|
||||
private Context context;
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.keyboardEnable(true) //解决软键盘与底部输入框冲突问题
|
||||
// .keyboardEnable(true, WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE
|
||||
// | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) //软键盘自动弹出
|
||||
.init();
|
||||
context = this;
|
||||
progressDialog = new ProgressDialog(this);
|
||||
mDataBinding.left.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
type = getIntent().getIntExtra("type", -1);
|
||||
orderType = getIntent().getIntExtra("orderType", -1);
|
||||
initRec();
|
||||
|
||||
|
||||
mDataBinding.dw.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
|
||||
getList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
page = 1;
|
||||
getList();
|
||||
}
|
||||
});
|
||||
mDataBinding.dw.autoRefresh();
|
||||
if (orderType == 1) {
|
||||
mDataBinding.tvTitle.setText("待付款");
|
||||
} else if (orderType == 2) {
|
||||
mDataBinding.tvTitle.setText("待发货");
|
||||
} else if (orderType == 3) {
|
||||
mDataBinding.tvTitle.setText("待收货");
|
||||
} else if (orderType == 4) {
|
||||
mDataBinding.tvTitle.setText("待评价");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initRec() {
|
||||
BaseRecycleViewAdapter<OrderListBean, ItemOrderBinding> adapter = new BaseRecycleViewAdapter<>(context, R.layout.item_order);
|
||||
adapter.setOnBindViewHolder(new BaseRecycleViewAdapter.BindView<ItemOrderBinding>() {
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ItemOrderBinding b, int position) {
|
||||
final OrderListBean orderListBean = list.get(position);
|
||||
if (type == 1) {
|
||||
if (orderType == 1) {
|
||||
//待付款
|
||||
b.btnFk.setVisibility(View.VISIBLE);
|
||||
b.btnFk.setText("付款");
|
||||
b.btnCancel.setVisibility(View.VISIBLE);
|
||||
b.btnCancel.setText("取消订单");
|
||||
b.tvInfo.setVisibility(View.VISIBLE);
|
||||
} else if (orderType == 2) {
|
||||
//待发货
|
||||
b.btnFk.setVisibility(View.VISIBLE);
|
||||
b.btnFk.setText("取消订单");
|
||||
b.btnCancel.setVisibility(View.GONE);
|
||||
b.tvInfo.setVisibility(View.GONE);
|
||||
} else if (orderType == 3) {
|
||||
//待收货
|
||||
b.btnFk.setVisibility(View.VISIBLE);
|
||||
b.btnFk.setText("确认收货");
|
||||
b.btnCancel.setVisibility(View.GONE);
|
||||
b.tvInfo.setVisibility(View.GONE);
|
||||
} else if (orderType == 4) {
|
||||
//待评价
|
||||
b.btnFk.setVisibility(View.VISIBLE);
|
||||
b.btnFk.setText("删除订单");
|
||||
b.btnCancel.setVisibility(View.GONE);
|
||||
b.tvInfo.setVisibility(View.GONE);
|
||||
}
|
||||
} else if (type == 2) {
|
||||
b.tvInfo.setVisibility(View.GONE);
|
||||
if (orderType == 2) {
|
||||
b.btnFk.setVisibility(View.VISIBLE);
|
||||
b.btnFk.setText("确认发货");
|
||||
} else {
|
||||
b.btnFk.setVisibility(View.GONE);
|
||||
}
|
||||
b.btnCancel.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
b.tvAmount.setText("¥" + orderListBean.getOrder_money());
|
||||
RequestOptions requestOptions = new RequestOptions();
|
||||
requestOptions.placeholder(R.mipmap.head);
|
||||
requestOptions.error(R.mipmap.head);
|
||||
|
||||
Glide.with(context).load(orderListBean.getAvatar())
|
||||
.apply(requestOptions)
|
||||
.into(b.ivHead);
|
||||
b.tvUsername.setText(orderListBean.getNickname());
|
||||
b.rv.setLayoutManager(new LinearLayoutManager(context));
|
||||
BaseRecycleViewAdapter<OrderListBean.Content_info, ItemOrderItemBinding> itemAdapter = new BaseRecycleViewAdapter<>(context, R.layout.item_order_item);
|
||||
itemAdapter.setOnBindViewHolder(new BaseRecycleViewAdapter.BindView<ItemOrderItemBinding>() {
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ItemOrderItemBinding b, int position) {
|
||||
if (!(position >= orderListBean.getContent_info().size())) {
|
||||
OrderListBean.Content_info content_info = orderListBean.getContent_info().get(position);
|
||||
b.tvGoodsName.setText(content_info.getName());
|
||||
b.tvInfo2.setText(content_info.getProperty());
|
||||
b.tvPrice.setText("¥" + content_info.getSale_price());
|
||||
b.tvNum.setText("x" + content_info.getGoods_num());
|
||||
RequestOptions requestOptions = new RequestOptions();
|
||||
requestOptions.placeholder(R.mipmap.icon_default_rectangle);
|
||||
requestOptions.error(R.mipmap.icon_default_rectangle);
|
||||
|
||||
Glide.with(context).load(content_info.getImg())
|
||||
.apply(requestOptions)
|
||||
.into(b.ivGoods);
|
||||
}
|
||||
}
|
||||
});
|
||||
itemAdapter.setData(orderListBean.getContent_info());
|
||||
b.rv.setAdapter(itemAdapter);
|
||||
b.rv.setLayoutManager(new LinearLayoutManager(context));
|
||||
b.btnCancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//取消订单
|
||||
new XPopup.Builder(context).asConfirm("", "确定要取消订单吗?", new OnConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
orderAction(1, orderListBean.getOrder_id(), "");
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
});
|
||||
b.btnFk.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (b.btnFk.getText().equals("付款")) {
|
||||
//付款
|
||||
|
||||
} else if (b.btnFk.getText().equals("取消订单")) {
|
||||
new XPopup.Builder(context).asConfirm("", "确定要取消订单吗?", new OnConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
orderAction(1, orderListBean.getOrder_id(), "");
|
||||
}
|
||||
}).show();
|
||||
} else if (b.btnFk.getText().equals("确认收货")) {
|
||||
new XPopup.Builder(context).asConfirm("", "真的要确认收货吗?", new OnConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
orderAction(2, orderListBean.getOrder_id(), "");
|
||||
}
|
||||
}).show();
|
||||
} else if (b.btnFk.getText().equals("删除订单")) {
|
||||
new XPopup.Builder(context).asConfirm("", "确定要删除订单吗?", new OnConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
orderAction(3, orderListBean.getOrder_id(), "");
|
||||
}
|
||||
}).show();
|
||||
} else if (b.btnFk.getText().equals("确认发货")) {
|
||||
new XPopup.Builder(context).asInputConfirm("确认发货", "", "", "请输入物流编号", new OnInputConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
orderAction(4, orderListBean.getOrder_id(), text);
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
mDataBinding.rec.setLayoutManager(new LinearLayoutManager(context));
|
||||
mDataBinding.rec.setAdapter(adapter);
|
||||
adapter.setOnItemClickListener(new BaseRecycleViewAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(View itemView, int position) {
|
||||
Intent intent = new Intent(context, OrderDetailActivity.class);
|
||||
intent.putExtra("type", type);
|
||||
intent.putExtra("orderType", orderType);
|
||||
intent.putExtra("orderId", list.get(position).getOrder_id());
|
||||
startActivityForResult(intent, 15);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loader loader = new Loader();
|
||||
private ArrayList<OrderListBean> list = new ArrayList<>();
|
||||
|
||||
private void orderAction(int action, String order_id, String info) {
|
||||
progressDialog.setMessage("提交中");
|
||||
progressDialog.show();
|
||||
RegisterUser user =
|
||||
Config.getInstance(context).getUser();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (user != null) {
|
||||
map.put("userid", user.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
map.put("app", "Order");
|
||||
if (action == 4) {
|
||||
map.put("class", "StoreOrderAction");
|
||||
map.put("logistics_no", info);
|
||||
} else {
|
||||
map.put("class", "OrderAction");
|
||||
|
||||
}
|
||||
map.put("action", action + "");
|
||||
map.put("order_id", order_id);
|
||||
if (action == 4) {
|
||||
map.put("sign", Md5.md5("Order" + "StoreOrderAction" + Md5.secret));
|
||||
} else {
|
||||
map.put("sign", Md5.md5("Order" + "OrderAction" + Md5.secret));
|
||||
|
||||
}
|
||||
loader.getMovie(ApiConfig.BASE_URL, map).subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
progressDialog.dismiss();
|
||||
if (resultcode.status == 0) {
|
||||
setToast(resultcode.msg);
|
||||
page = 1;
|
||||
getList();
|
||||
} else {
|
||||
setToast(resultcode.msg);
|
||||
}
|
||||
}
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
progressDialog.dismiss();
|
||||
setToast("操作失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getList() {
|
||||
|
||||
RegisterUser user =
|
||||
Config.getInstance(context).getUser();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (user != null) {
|
||||
map.put("userid", user.getUserid());
|
||||
map.put("goods_user_id", user.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
map.put("goods_user_id", 0 + "");
|
||||
}
|
||||
map.put("app", "Order");
|
||||
if (type == 1) {
|
||||
map.put("class", "OrderLists");
|
||||
map.put("sign", Md5.md5("Order" + "OrderLists" + Md5.secret));
|
||||
} else if (type == 2) {
|
||||
map.put("class", "StoreOrderLists");
|
||||
map.put("sign", Md5.md5("Order" + "StoreOrderLists" + Md5.secret));
|
||||
}
|
||||
map.put("type", orderType + "");
|
||||
map.put("page", page + "");
|
||||
loader.getMovie(ApiConfig.BASE_URL, map)
|
||||
.subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
mDataBinding.dw.finishLoadMore();
|
||||
mDataBinding.dw.finishRefresh();
|
||||
progressDialog.dismiss();
|
||||
if (resultcode.status != 0) {
|
||||
setToast(resultcode.msg);
|
||||
return;
|
||||
}
|
||||
Gson gs = new Gson();
|
||||
LinkedTreeMap adta = (LinkedTreeMap) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(s);
|
||||
org.json.JSONArray array = jsonObject.getJSONArray("info");
|
||||
|
||||
//买家订单
|
||||
Type type = new TypeToken<ArrayList<OrderListBean>>() {
|
||||
}.getType();
|
||||
ArrayList<OrderListBean> newList = gs.fromJson(array.toString(), type);
|
||||
int count = jsonObject.getInt("count");
|
||||
|
||||
if (page == 1) {
|
||||
list.clear();
|
||||
}
|
||||
list.addAll(newList);
|
||||
if (list.size() == count || newList.isEmpty()) {
|
||||
mDataBinding.dw.finishLoadMoreWithNoMoreData();
|
||||
} else {
|
||||
page++;
|
||||
}
|
||||
BaseRecycleViewAdapter baseRecycleViewAdapter = (BaseRecycleViewAdapter) mDataBinding.rec.getAdapter();
|
||||
baseRecycleViewAdapter.setData(list);
|
||||
} catch (Exception e) {
|
||||
e.fillInStackTrace();
|
||||
}
|
||||
}
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
mDataBinding.dw.finishLoadMore();
|
||||
mDataBinding.dw.finishRefresh();
|
||||
progressDialog.dismiss();
|
||||
throwable.fillInStackTrace();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 15 && resultCode == 200) {
|
||||
page = 1;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
package com.sl.house_property.order;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.view.View;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.internal.LinkedTreeMap;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
||||
import com.lxj.xpopup.interfaces.OnInputConfirmListener;
|
||||
import com.sl.house_property.BaseActivity;
|
||||
import com.sl.house_property.R;
|
||||
import com.sl.house_property.databinding.ActivityOrderDetailBinding;
|
||||
import com.sl.house_property.databinding.ItemOrderItemBinding;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import adapter.BaseRecycleViewAdapter;
|
||||
import entity.OrderListBean;
|
||||
import entity.RegisterUser;
|
||||
import http.ApiConfig;
|
||||
import my_loader.Loader;
|
||||
import my_loader.Resultcode;
|
||||
import rx.functions.Action1;
|
||||
import tools.Config;
|
||||
import utils.Md5;
|
||||
|
||||
public class OrderDetailActivity extends BaseActivity<ActivityOrderDetailBinding> {
|
||||
private Context context;
|
||||
private ProgressDialog progressDialog;
|
||||
private int orderType = -1;
|
||||
private int type = -1;
|
||||
private String orderId;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
return R.layout.activity_order_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
context = this;
|
||||
progressDialog = new ProgressDialog(this);
|
||||
ImmersionBar.with(this)
|
||||
.keyboardEnable(true) //解决软键盘与底部输入框冲突问题
|
||||
// .keyboardEnable(true, WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE
|
||||
// | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) //软键盘自动弹出
|
||||
.init();
|
||||
context = this;
|
||||
progressDialog = new ProgressDialog(this);
|
||||
type = getIntent().getIntExtra("type", -1);
|
||||
orderType = getIntent().getIntExtra("orderType", -1);
|
||||
orderId = getIntent().getStringExtra("orderId");
|
||||
mDataBinding.left.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
mDataBinding.tvTitle.setText("订单详情");
|
||||
getData();
|
||||
}
|
||||
|
||||
Loader loader = new Loader();
|
||||
|
||||
private void getData() {
|
||||
RegisterUser user =
|
||||
Config.getInstance(context).getUser();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (user != null) {
|
||||
map.put("userid", user.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
map.put("app", "Order");
|
||||
map.put("class", "OrderInfo");
|
||||
map.put("order_id", orderId);
|
||||
map.put("sign", Md5.md5("Order" + "OrderInfo" + Md5.secret));
|
||||
loader.getMovie(ApiConfig.BASE_URL, map).subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
if (resultcode.status == 0) {
|
||||
LinkedTreeMap adta = (LinkedTreeMap) resultcode.data;
|
||||
String s = new Gson().toJson(adta);
|
||||
OrderListBean orderListBean = new Gson().fromJson(s, OrderListBean.class);
|
||||
setViewData(orderListBean);
|
||||
}
|
||||
}
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setViewData(final OrderListBean orderListBean) {
|
||||
BaseRecycleViewAdapter<OrderListBean.Content_info, ItemOrderItemBinding> itemAdapter = new BaseRecycleViewAdapter<>(context, R.layout.item_order_item);
|
||||
itemAdapter.setOnBindViewHolder(new BaseRecycleViewAdapter.BindView<ItemOrderItemBinding>() {
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ItemOrderItemBinding b, int position) {
|
||||
if (!(position >= orderListBean.getContent_info().size())) {
|
||||
OrderListBean.Content_info content_info = orderListBean.getContent_info().get(position);
|
||||
b.tvGoodsName.setText(content_info.getName());
|
||||
b.tvInfo2.setText(content_info.getProperty());
|
||||
b.tvPrice.setText("¥" + content_info.getSale_price());
|
||||
b.tvNum.setText("x" + content_info.getGoods_num());
|
||||
RequestOptions requestOptions = new RequestOptions();
|
||||
requestOptions.placeholder(R.mipmap.icon_default_rectangle);
|
||||
requestOptions.error(R.mipmap.icon_default_rectangle);
|
||||
|
||||
Glide.with(context).load(content_info.getImg())
|
||||
.apply(requestOptions)
|
||||
.into(b.ivGoods);
|
||||
}
|
||||
}
|
||||
});
|
||||
itemAdapter.setData(orderListBean.getContent_info());
|
||||
mDataBinding.rv.setLayoutManager(new LinearLayoutManager(context));
|
||||
mDataBinding.rv.setAdapter(itemAdapter);
|
||||
mDataBinding.tvAmount.setText("¥" + orderListBean.getOrder_money());
|
||||
mDataBinding.tv2.setText("¥" + orderListBean.getOrder_money());
|
||||
mDataBinding.tvOrderId.setText(orderListBean.getOrder_number());
|
||||
mDataBinding.tvOrderTime.setText(orderListBean.getCtime());
|
||||
if (orderListBean.getOrder_status().equals("0")) {
|
||||
mDataBinding.tvState.setText("等待买家付款");
|
||||
} else if (orderListBean.getOrder_status().equals("1")) {
|
||||
mDataBinding.tvState.setText("等待卖家发货");
|
||||
} else if (orderListBean.getOrder_status().equals("2")) {
|
||||
mDataBinding.tvState.setText("等待买家收货");
|
||||
} else if (orderListBean.getOrder_status().equals("3")) {
|
||||
mDataBinding.tvState.setText("订单已完成");
|
||||
}
|
||||
if (type == 1) {
|
||||
if (orderType == 1) {
|
||||
//待付款
|
||||
mDataBinding.btnFk.setVisibility(View.VISIBLE);
|
||||
mDataBinding.btnFk.setText("付款");
|
||||
mDataBinding.btnCancel.setVisibility(View.VISIBLE);
|
||||
mDataBinding.btnCancel.setText("取消订单");
|
||||
|
||||
} else if (orderType == 2) {
|
||||
//待发货
|
||||
mDataBinding.btnFk.setVisibility(View.VISIBLE);
|
||||
mDataBinding.btnFk.setText("取消订单");
|
||||
mDataBinding.btnCancel.setVisibility(View.GONE);
|
||||
|
||||
} else if (orderType == 3) {
|
||||
//待收货
|
||||
mDataBinding.btnFk.setVisibility(View.VISIBLE);
|
||||
mDataBinding.btnFk.setText("确认收货");
|
||||
mDataBinding.btnCancel.setVisibility(View.GONE);
|
||||
} else if (orderType == 4) {
|
||||
//待评价
|
||||
mDataBinding.btnFk.setVisibility(View.VISIBLE);
|
||||
mDataBinding.btnFk.setText("删除订单");
|
||||
mDataBinding.btnCancel.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
} else if (type == 2) {
|
||||
|
||||
if (orderType == 2) {
|
||||
mDataBinding.btnFk.setVisibility(View.VISIBLE);
|
||||
mDataBinding.btnFk.setText("确认发货");
|
||||
} else {
|
||||
mDataBinding.btnFk.setVisibility(View.GONE);
|
||||
}
|
||||
mDataBinding.btnCancel.setVisibility(View.GONE);
|
||||
}
|
||||
mDataBinding.btnCancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//取消订单
|
||||
new XPopup.Builder(context).asConfirm("", "确定要取消订单吗?", new OnConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
orderAction(1, orderListBean.getOrder_id(), "");
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
});
|
||||
mDataBinding.btnFk.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mDataBinding.btnFk.getText().equals("付款")) {
|
||||
//付款
|
||||
|
||||
} else if (mDataBinding.btnFk.getText().equals("取消订单")) {
|
||||
new XPopup.Builder(context).asConfirm("", "确定要取消订单吗?", new OnConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
orderAction(1, orderListBean.getOrder_id(), "");
|
||||
}
|
||||
}).show();
|
||||
} else if (mDataBinding.btnFk.getText().equals("确认收货")) {
|
||||
new XPopup.Builder(context).asConfirm("", "真的要确认收货吗?", new OnConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
orderAction(2, orderListBean.getOrder_id(), "");
|
||||
}
|
||||
}).show();
|
||||
} else if (mDataBinding.btnFk.getText().equals("删除订单")) {
|
||||
new XPopup.Builder(context).asConfirm("", "确定要删除订单吗?", new OnConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
orderAction(3, orderListBean.getOrder_id(), "");
|
||||
}
|
||||
}).show();
|
||||
} else if (mDataBinding.btnFk.getText().equals("确认发货")) {
|
||||
new XPopup.Builder(context).asInputConfirm("确认发货", "", "", "请输入物流编号", new OnInputConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
orderAction(4, orderListBean.getOrder_id(), text);
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void orderAction(int action, String order_id, String info) {
|
||||
progressDialog.setMessage("提交中");
|
||||
progressDialog.show();
|
||||
RegisterUser user =
|
||||
Config.getInstance(context).getUser();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (user != null) {
|
||||
map.put("userid", user.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
map.put("app", "Order");
|
||||
if (action == 4) {
|
||||
map.put("class", "StoreOrderAction");
|
||||
map.put("logistics_no", info);
|
||||
} else {
|
||||
map.put("class", "OrderAction");
|
||||
|
||||
}
|
||||
map.put("action", action + "");
|
||||
map.put("order_id", order_id);
|
||||
if (action == 4) {
|
||||
map.put("sign", Md5.md5("Order" + "StoreOrderAction" + Md5.secret));
|
||||
} else {
|
||||
map.put("sign", Md5.md5("Order" + "OrderAction" + Md5.secret));
|
||||
|
||||
}
|
||||
loader.getMovie(ApiConfig.BASE_URL, map).subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
progressDialog.dismiss();
|
||||
if (resultcode.status == 0) {
|
||||
setToast(resultcode.msg);
|
||||
page = 1;
|
||||
setResult(200);
|
||||
finish();
|
||||
} else {
|
||||
setToast(resultcode.msg);
|
||||
}
|
||||
}
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
progressDialog.dismiss();
|
||||
setToast("操作失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.sl.house_property.order;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import com.sl.house_property.BaseActivity;
|
||||
import com.sl.house_property.R;
|
||||
import com.sl.house_property.databinding.ActivitySettleBinding;
|
||||
|
||||
public class SettleActivity extends BaseActivity<ActivitySettleBinding> {
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
return R.layout.activity_settle;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
}
|
||||
}
|
||||
180
app/src/main/java/entity/OrderListBean.java
Normal file
180
app/src/main/java/entity/OrderListBean.java
Normal file
@@ -0,0 +1,180 @@
|
||||
package entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class OrderListBean {
|
||||
private String order_id;
|
||||
private String pay_way;
|
||||
private String order_number;
|
||||
private String order_money;
|
||||
private String order_status;
|
||||
private String pay_status;
|
||||
private String ctime;
|
||||
private String goods_user_id;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private ArrayList<Content_info> content_info;
|
||||
private String store_phone;
|
||||
|
||||
public String getStore_phone() {
|
||||
return store_phone;
|
||||
}
|
||||
|
||||
public void setStore_phone(String store_phone) {
|
||||
this.store_phone = store_phone;
|
||||
}
|
||||
|
||||
public String getOrder_id() {
|
||||
return order_id;
|
||||
}
|
||||
|
||||
public void setOrder_id(String order_id) {
|
||||
this.order_id = order_id;
|
||||
}
|
||||
|
||||
public String getPay_way() {
|
||||
return pay_way;
|
||||
}
|
||||
|
||||
public void setPay_way(String pay_way) {
|
||||
this.pay_way = pay_way;
|
||||
}
|
||||
|
||||
public String getOrder_number() {
|
||||
return order_number;
|
||||
}
|
||||
|
||||
public void setOrder_number(String order_number) {
|
||||
this.order_number = order_number;
|
||||
}
|
||||
|
||||
public String getOrder_money() {
|
||||
return order_money;
|
||||
}
|
||||
|
||||
public void setOrder_money(String order_money) {
|
||||
this.order_money = order_money;
|
||||
}
|
||||
|
||||
public String getOrder_status() {
|
||||
return order_status;
|
||||
}
|
||||
|
||||
public void setOrder_status(String order_status) {
|
||||
this.order_status = order_status;
|
||||
}
|
||||
|
||||
public String getPay_status() {
|
||||
return pay_status;
|
||||
}
|
||||
|
||||
public void setPay_status(String pay_status) {
|
||||
this.pay_status = pay_status;
|
||||
}
|
||||
|
||||
public String getCtime() {
|
||||
return ctime;
|
||||
}
|
||||
|
||||
public void setCtime(String ctime) {
|
||||
this.ctime = ctime;
|
||||
}
|
||||
|
||||
public String getGoods_user_id() {
|
||||
return goods_user_id;
|
||||
}
|
||||
|
||||
public void setGoods_user_id(String goods_user_id) {
|
||||
this.goods_user_id = goods_user_id;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public ArrayList<Content_info> getContent_info() {
|
||||
return content_info;
|
||||
}
|
||||
|
||||
public void setContent_info(ArrayList<Content_info> content_info) {
|
||||
this.content_info = content_info;
|
||||
}
|
||||
|
||||
public static class Content_info {
|
||||
private String img;
|
||||
private String property;
|
||||
private String name;
|
||||
private String sale_price;
|
||||
private String goods_num;
|
||||
private String product_code;
|
||||
private String goods_id;
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public void setImg(String img) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public String getProperty() {
|
||||
return property;
|
||||
}
|
||||
|
||||
public void setProperty(String property) {
|
||||
this.property = property;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSale_price() {
|
||||
return sale_price;
|
||||
}
|
||||
|
||||
public void setSale_price(String sale_price) {
|
||||
this.sale_price = sale_price;
|
||||
}
|
||||
|
||||
public String getGoods_num() {
|
||||
return goods_num;
|
||||
}
|
||||
|
||||
public void setGoods_num(String goods_num) {
|
||||
this.goods_num = goods_num;
|
||||
}
|
||||
|
||||
public String getProduct_code() {
|
||||
return product_code;
|
||||
}
|
||||
|
||||
public void setProduct_code(String product_code) {
|
||||
this.product_code = product_code;
|
||||
}
|
||||
|
||||
public String getGoods_id() {
|
||||
return goods_id;
|
||||
}
|
||||
|
||||
public void setGoods_id(String goods_id) {
|
||||
this.goods_id = goods_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
app/src/main/res/drawable/shape_btn_grey.xml
Normal file
11
app/src/main/res/drawable/shape_btn_grey.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<size android:width="2dp" />
|
||||
|
||||
<corners android:radius="60dp"/>
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/darkgray" />
|
||||
|
||||
</shape>
|
||||
223
app/src/main/res/layout/activity_add_address.xml
Normal file
223
app/src/main/res/layout/activity_add_address.xml
Normal file
@@ -0,0 +1,223 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:src="@mipmap/fanhui" />
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="收货地址"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:background="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="4"
|
||||
android:gravity="center_vertical"
|
||||
android:text="收货人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入收货人姓名"
|
||||
android:maxLength="15"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/gray"
|
||||
android:textSize="14sp"
|
||||
|
||||
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@color/gap_line" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="4"
|
||||
android:gravity="center_vertical"
|
||||
android:text="手机号码"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:maxLength="11"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入收货人手机号"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/gray"
|
||||
android:textSize="14sp"
|
||||
|
||||
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@color/gap_line" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_select_area"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="4"
|
||||
android:gravity="center_vertical"
|
||||
android:text="地区"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择地区"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/gray"
|
||||
android:textSize="14sp"
|
||||
|
||||
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@color/gap_line" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:minHeight="100dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="4"
|
||||
android:text="详细地址"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:gravity="top"
|
||||
android:hint="街道、门牌号等"
|
||||
android:lines="5"
|
||||
android:minHeight="100dp"
|
||||
android:maxLength="200"
|
||||
android:textColorHint="@color/gray"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/btn_submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="32dp"
|
||||
android:background="@drawable/btn_green_shape"
|
||||
android:text="保存"
|
||||
android:textColor="@color/white"
|
||||
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -22,7 +22,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:background="@color/backcolorAccent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -12,13 +12,24 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:background="@color/backcolorAccent"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:src="@mipmap/fanhui" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dp"
|
||||
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="收货地址"
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:background="@color/backcolorAccent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
@@ -36,7 +35,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp"
|
||||
android:text="删除"
|
||||
android:textColor="@color/black"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
55
app/src/main/res/layout/activity_order.xml
Normal file
55
app/src/main/res/layout/activity_order.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:src="@mipmap/fanhui" />
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="xx"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/dw"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableLoadMoreWhenContentNotFull="true">
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rec"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
303
app/src/main/res/layout/activity_order_detail.xml
Normal file
303
app/src/main/res/layout/activity_order_detail.xml
Normal file
@@ -0,0 +1,303 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:src="@mipmap/fanhui" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="xx"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="32dp"
|
||||
android:text="等待买家付款"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/dw" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_toRightOf="@id/iv"
|
||||
android:text="张三"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_toRightOf="@id/tv_name"
|
||||
android:text="151d2d1s32d13"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_name"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_toRightOf="@id/iv"
|
||||
android:text="jksdbasdbnasdjansdmasnd.,masnd.asm,dn" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/gap_line"
|
||||
|
||||
/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/gap_line" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="商品总价"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="135.00"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_amount"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="运费(快递)"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_shipping"
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_amount"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="0.00"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_shipping"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="合计"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_shipping"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="100.00"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@color/gap_line"
|
||||
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="订单信息"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_3"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="订单编号:"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_3"
|
||||
android:layout_marginLeft="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_toRightOf="@id/tv_4"
|
||||
android:text="12sd1s3d1s3ds1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_4"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="创建时间:"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
||||
android:id="@+id/tv_order_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_4"
|
||||
android:layout_marginLeft="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_toRightOf="@id/tv_5"
|
||||
android:text="2021526151"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
<Button
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_toLeftOf="@id/btn_fk"
|
||||
android:background="@drawable/shape_btn_grey"
|
||||
android:text="取消订单"
|
||||
android:textColor="@color/darkgray" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_fk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/shape_btn_grey"
|
||||
android:text="付款"
|
||||
android:textColor="@color/darkgray"
|
||||
android:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
11
app/src/main/res/layout/activity_settle.xml
Normal file
11
app/src/main/res/layout/activity_settle.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -14,7 +14,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:background="@color/backcolorAccent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:background="@color/backcolorAccent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -323,6 +323,7 @@
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
@@ -333,6 +334,7 @@
|
||||
android:text="待付款" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
@@ -343,6 +345,7 @@
|
||||
android:text="待发货" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
@@ -388,6 +391,7 @@
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
@@ -398,6 +402,7 @@
|
||||
android:text="待付款" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
@@ -408,6 +413,7 @@
|
||||
android:text="待发货" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
||||
108
app/src/main/res/layout/item_order.xml
Normal file
108
app/src/main/res/layout/item_order.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#F7F7F7"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<CheckBox
|
||||
android:visibility="gone"
|
||||
android:id="@+id/cb_check"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:background="@drawable/checkbox_style"
|
||||
android:button="@null"
|
||||
android:clickable="false" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@mipmap/head" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="梦"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="需付款"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="135.00"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
android:visibility="invisible"
|
||||
android:id="@+id/btn_fk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@+id/tv_amount"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/shape_btn_grey"
|
||||
android:text="付款"
|
||||
|
||||
android:textColor="@color/darkgray" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@+id/tv_amount"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_toLeftOf="@id/btn_fk"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@drawable/shape_btn_grey"
|
||||
android:text="取消订单"
|
||||
|
||||
android:textColor="@color/darkgray" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
65
app/src/main/res/layout/item_order_item.xml
Normal file
65
app/src/main/res/layout/item_order_item.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_goods"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:src="@color/default_text_color"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_goods_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_toRightOf="@id/iv_goods"
|
||||
android:text="多恐惧感"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_info2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_goods_name"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_toRightOf="@id/iv_goods"
|
||||
android:text="明年考了"
|
||||
android:textColor="#999999" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginRight="16dp"
|
||||
android:id="@+id/tv_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="¥135.00"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginRight="16dp"
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_price"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="x1"
|
||||
android:textColor="@color/darkgray"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
BIN
app/src/main/res/mipmap-xhdpi/dw.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/dw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -30,6 +30,7 @@
|
||||
</style>
|
||||
|
||||
<style name="MyThemeactonbar" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
|
||||
<!-- <style name="MyTheme" parent="@android:style/Theme.Black.NoTitleBar.Fullscreen">-->
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
|
||||
Reference in New Issue
Block a user