Commit 1c7c3e96 by 罗翻

增加订单相关错误码,账户列表使用lrecyclerview

parent 575c7865
Showing with 578 additions and 214 deletions
......@@ -163,6 +163,10 @@
android:screenOrientation="portrait"
/>
<activity
android:name=".ui.AccountBalanceActivity11"
android:screenOrientation="portrait"
/>
<activity
android:name=".ui.AccountBalanceActivity"
android:screenOrientation="portrait"
/>
......
......@@ -23,13 +23,13 @@ public class Constants {
public static final int DEBUGLEVEL = LogUtils.LEVEL_ALL;
public static final String BASE_URL = "http://47.94.101.239:3112";
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
// public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
/**************************正式环境*******************************/
// public static final int DEBUGLEVEL = LogUtils.LEVEL_OFF;
// public static final String BASE_URL = "https://mobile.dayu.ai";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
// public final static String WEB_SOP = "http://192.168.1.117:8080/#/sop";
public final static String WEB_SOP = "http://192.168.1.132:8080/#/sop";
/*****************/
public static final String LOGIN_URL = "/check";
//登录时发送验证码的URL
......
......@@ -60,7 +60,7 @@ public class APIException {
return ex;
} else if (e instanceof ServerException) {
ServerException resultException = (ServerException) e;
ex = new ResponeThrowable(resultException, SERVER_ERROR);
ex = new ResponeThrowable(resultException, SERVER_ERROR, resultException.code);
ex.message = resultException.message;
return ex;
} else if (e instanceof JsonParseException
......@@ -132,12 +132,20 @@ public class APIException {
public static class ResponeThrowable extends Exception {
public int code;
public String message;
public String subCode;
public ResponeThrowable(Throwable throwable, int code) {
super(throwable);
this.code = code;
}
public ResponeThrowable(Throwable throwable, int code, String subCode) {
super(throwable);
this.code = code;
this.subCode = subCode;
}
}
}
......@@ -24,11 +24,28 @@ public class ServerException extends Exception {
return;
}
switch (code) {
//order相关
/** order相关错误*/
case "ORDER0001":
message = MyApplication.getContext().getString(R.string.order_not_exite);
break;
//user相关
case "ORDER0002":
message = MyApplication.getContext().getString(R.string.order_receive_already);
break;
case "ORDER0003":
message = MyApplication.getContext().getString(R.string.order_cancle_not_receive);
break;
case "ORDER0004":
message = MyApplication.getContext().getString(R.string.order_cancle_not_subcribe);
break;
case "ORDER0005":
message = MyApplication.getContext().getString(R.string.order_cancle_not_begin);
break;
case "ORDER0006":
message = MyApplication.getContext().getString(R.string.order_cancle_not_process);
break;
/** 用户相关错误*/
case "USER0004":
message = MyApplication.getContext().getString(R.string.not_engineer);
break;
......
......@@ -6,10 +6,10 @@ import android.util.Log;
import com.dayu.bigfish.R;
import com.dayu.bigfish.api.APIException;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.managers.UserManager;
import com.dayu.bigfish.ui.LoginActivity;
import com.dayu.bigfish.ui.views.CustomDialog;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.managers.UserManager;
import com.hyphenate.chat.EMClient;
import io.reactivex.Observer;
......@@ -92,7 +92,7 @@ public abstract class BasePresenter<V> {
* @return
*/
public <V> Observer baseObserver(final Consumer<? super V> consumer, final Consumer<Throwable> tconsumer) {
public <V> Observer baseObserver(final Consumer<? super V> consumer, final Consumer<APIException.ResponeThrowable> tconsumer) {
return new Observer<V>() {
@Override
public void onSubscribe(Disposable d) {
......@@ -112,10 +112,10 @@ public abstract class BasePresenter<V> {
@Override
public void onError(Throwable e) {
Log.d("reguest+error", e.toString());
processException(e);
APIException.ResponeThrowable exception = processException(e);
ProgressUtil.stopLoad();
try {
tconsumer.accept(e);
tconsumer.accept(exception);
} catch (Exception e1) {
e1.printStackTrace();
}
......@@ -128,7 +128,7 @@ public abstract class BasePresenter<V> {
};
}
private void processException(Throwable e) {
private APIException.ResponeThrowable processException(Throwable e) {
APIException.ResponeThrowable exception = APIException.APIException(e);
int code = exception.code;
String message = exception.message;
......@@ -136,13 +136,14 @@ public abstract class BasePresenter<V> {
if (mDialog == null || (mDialog != null && !mDialog.isShowing())) {
showLoginDialog();
}
return;
return exception;
}
if (mView instanceof BaseBingdActivity) {
((BaseBingdActivity) mView).showToast(message);
} else if (mView instanceof BaseBingFragment) {
((BaseBingFragment) mView).showToast(message);
}
return exception;
}
/**
......
......@@ -53,10 +53,13 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
if (needHint && holder.itemView.getTag() == null) {
holder.itemView.setTag(item);
holder.itemView.postDelayed(() -> {
if (mPresenter != null) {
holder.mBind.setVariable(BR.presenter, mPresenter);
}
holder.mBind.setVariable(BR.item, holder.itemView.getTag());
holder.mBind.executePendingBindings();
if (!(item instanceof Boolean)) {
onBind(holder, position, (M) item);
onBind(holder, (M) item);
}
}, 100);
} else {
......@@ -69,10 +72,10 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
holder.mBind.setVariable(BR.item, item);
holder.mBind.executePendingBindings();
if (item != null && !(item instanceof Boolean)) {
onBind(holder, position, (M) item);
onBind(holder, (M) item);
holder.mBind.getRoot().setOnClickListener(v -> {
if (mOnItemClickListener != null) {
mOnItemClickListener.OnItemClick(item, holder.mBind, position);
mOnItemClickListener.OnItemClick(item, holder.mBind);
}
});
}
......@@ -185,13 +188,22 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
}
}
protected void onBind(BaseViewHolder holder, int position, M item) {
protected void onBind(BaseViewHolder holder, M item) {
}
public void setOnItemClickListener(OnItemClickListener<M, B> listener) {
mOnItemClickListener = listener;
}
/**
* 获取数据源.
*
* @return
*/
public List<M> getDatas() {
return mItemList;
}
public Context getContext() {
return mContext;
}
......
......@@ -7,64 +7,6 @@ import java.util.List;
*/
public class OrderDetail {
/**
* id : 48
* orderNum : 20171013151641110126
* source : 1
* partnerNum : null
* partnerName : null
* status : 2
* repairType : 1
* customerType : 1
* customerName : 测试363
* customerCompany : 测试363
* customerMobile : 15265895425
* customerTelphome : 010-2569548
* provinceId : 1
* provinceName : 北京市
* cityId : 2
* cityName : 北京城区
* districtId : 3
* districtName : 东城区
* address : 某某大厦
* providerTypeId : 328
* providerName : 安装
* categoryId : C_727
* categoryName : 海贼王
* categorySource : null
* brandId : 438
* brandName : 春兰
* productModel : 256
* createId : 285
* created : 大鱼鱼头
* createTime : 2017-10-13 15:16:41
* appointmentTime : 2017-10-14 15:16:20
* comment : 测试363测试363
* confirmDoorTime : null
* confirmDoorComment : null
* serviceRecordComment : null
* customerCheckComment : null
* isPay : null
* payType : null
* doorPrice : null
* doorPriceComment : null
* servicePrice : null
* servicePriceComment : null
* materialCost : null
* materialCostComment : null
* otherPrice : null
* otherPriceComment : null
* totalPrice : null
* cancelOrderReason : null
* closePhase : null
* siteId : 143
* engineerId : 288
* feedback : null
* complait : null
* record : [{"id":174,"orderId":48,"createTime":"2017-10-13 15:16:41","operation":"工单创建","operationComment":"大鱼鱼头 通过 新建工单 创建了工单工程师大鱼冬师傅 (18062907260) 接单","serviceProgessTime":"T2","serviceProgessTimeNum":2,"commentName":"工单备注","commentInfo":"测试363测试363"}]
* pic : []
*/
private int id;
private String orderNum;
private int source;
......
......@@ -2,6 +2,7 @@ package com.dayu.bigfish.presenter.AppointmentOrder;
import com.app.annotation.apt.InstanceFactory;
import com.apt.ApiFactory;
import com.dayu.bigfish.api.APIException;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.Order;
......@@ -27,9 +28,9 @@ public class AppointmentPresenter extends AppointmentContract.Presenter {
public void accept(BasePageBean<Order> orderBasePageBean) throws Exception {
mView.getWatingOrderSuccess(orderBasePageBean);
}
}, new Consumer<Throwable>() {
}, new Consumer<APIException.ResponeThrowable>() {
@Override
public void accept(Throwable throwable) throws Exception {
public void accept(APIException.ResponeThrowable responeThrowable) throws Exception {
mView.getWatingOrderFial();
}
}));
......
......@@ -25,6 +25,8 @@ public interface AccountBalanceContract {
void getBalanceError();
void dumpToWithdrawal();
String getTotalPrice();
}
abstract class Presenter extends BasePresenter<View> {
......@@ -41,5 +43,7 @@ public interface AccountBalanceContract {
* 跳转到账户绑定界面.
*/
public abstract void dumpToWithdrawal();
public abstract String getTotalPrice();
}
}
......@@ -31,4 +31,9 @@ public class AccountBalancePresenter extends AccountBalanceContract.Presenter {
public void dumpToWithdrawal() {
mView.dumpToWithdrawal();
}
@Override
public String getTotalPrice() {
return mView.getTotalPrice();
}
}
......@@ -2,6 +2,7 @@ package com.dayu.bigfish.presenter.errororder;
import com.app.annotation.apt.InstanceFactory;
import com.apt.ApiFactory;
import com.dayu.bigfish.api.APIException;
import com.dayu.bigfish.bean.ErrorOrder;
import java.util.List;
......@@ -27,9 +28,9 @@ public class ErrorOrderPresenter extends ErrorOrderContract.Presenter {
public void accept(List<ErrorOrder> errorOrder) throws Exception {
mView.getErrorOrderSuccess(errorOrder);
}
}, new Consumer<Throwable>() {
}, new Consumer<APIException.ResponeThrowable>() {
@Override
public void accept(Throwable throwable) throws Exception {
public void accept(APIException.ResponeThrowable responeThrowable) throws Exception {
mView.getErrorOrderFial();
}
}));
......
......@@ -46,10 +46,6 @@ public class MainPresenter extends MainContract.Presenter {
public void accept(VersionInfo info) throws Exception {
mView.getUpgradeVersionSuccess(info);
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
}
}));
}
......
package com.dayu.bigfish.presenter.receivingorder;
import com.dayu.bigfish.api.APIException;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.base.BaseView;
......@@ -19,7 +20,7 @@ public interface ReceivingContract {
void receiveOrderSuccess();
void receiveOrderFail();
void receiveOrderFail(APIException.ResponeThrowable throwable);
}
abstract class Presenter extends BasePresenter<View> {
......
......@@ -25,12 +25,7 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
public void accept(BasePageBean<Order> orderBasePageBean) throws Exception {
mView.getReceiveOrderSuccess(orderBasePageBean);
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
mView.getReceiveOrderFail();
}
}));
}, throwable -> mView.getReceiveOrderFail()));
}
@Override
......@@ -40,6 +35,8 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
public void accept(Boolean aBoolean) throws Exception {
mView.receiveOrderSuccess();
}
}, responeThrowable -> {
mView.receiveOrderFail(responeThrowable);
}));
}
......
......@@ -2,6 +2,7 @@ package com.dayu.bigfish.presenter.serverorder;
import com.app.annotation.apt.InstanceFactory;
import com.apt.ApiFactory;
import com.dayu.bigfish.api.APIException;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.Order;
......@@ -33,9 +34,9 @@ public class ServerOrderPresenter extends ServerorderContract.Presenter {
public void accept(BasePageBean<Order> orderBasePageBean) throws Exception {
mView.getWatingOrderSuccess(orderBasePageBean);
}
}, new Consumer<Throwable>() {
}, new Consumer<APIException.ResponeThrowable>() {
@Override
public void accept(Throwable throwable) throws Exception {
public void accept(APIException.ResponeThrowable responeThrowable) throws Exception {
mView.getWatingOrderFial();
}
}));
......
package com.dayu.bigfish.presenter.subcribeTime;
import com.dayu.bigfish.api.APIException;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.base.BaseView;
import com.dayu.bigfish.ui.SubcribeTimeActivity;
......@@ -28,6 +29,12 @@ public interface SubcribeContract {
*
*/
void selectTime();
/**
* 预约时间失败.
* @param responeThrowable
*/
void subcribeTimeFail(APIException.ResponeThrowable responeThrowable);
}
abstract class Presenter extends BasePresenter<SubcribeTimeActivity> {
......
......@@ -5,6 +5,7 @@ import android.text.TextUtils;
import com.app.annotation.apt.InstanceFactory;
import com.apt.ApiFactory;
import com.dayu.bigfish.R;
import com.dayu.bigfish.api.APIException;
import io.reactivex.functions.Consumer;
......@@ -25,6 +26,11 @@ public class SubcribeTimePresenter extends SubcribeContract.Presenter {
public void accept(Boolean aBoolean) throws Exception {
mView.subcribeTimeSuccess();
}
}, new Consumer<APIException.ResponeThrowable>() {
@Override
public void accept(APIException.ResponeThrowable responeThrowable) throws Exception {
mView.subcribeTimeFail(responeThrowable);
}
}));
}
......
package com.dayu.bigfish.ui;
import android.content.Intent;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.MyApplication;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.AccountBalance;
import com.dayu.bigfish.databinding.ActivityAccountbalanceLayoutBinding;
import com.dayu.bigfish.databinding.ActivityAccountbalanceLayout1Binding;
import com.dayu.bigfish.presenter.accountbalance.AccountBalanceContract;
import com.dayu.bigfish.presenter.accountbalance.AccountBalancePresenter;
import com.dayu.bigfish.ui.adapter.AccountBalanceAdapter;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.ToastUtils;
/**
* Created by luofan on 2017/11/1.
*/
public class AccountBalanceActivity extends BaseBingdActivity<AccountBalancePresenter, ActivityAccountbalanceLayoutBinding> implements AccountBalanceContract.View
, SwipeRefreshLayout.OnRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
public class AccountBalanceActivity extends BaseBingdActivity<AccountBalancePresenter, ActivityAccountbalanceLayout1Binding>
implements AccountBalanceContract.View {
private int mUserId;
private AccountBalanceAdapter mAdapter;
private int mPage = 1;
private int mPageSize = Constants.PAGESIZE;
private int mTotalPage = 1;
private int mRefreshState = 1; //1:刷新,2:下拉加载
@Override
public int getLayoutId() {
......@@ -43,59 +32,29 @@ public class AccountBalanceActivity extends BaseBingdActivity<AccountBalancePres
@Override
public void initView() {
mBind.setPresenter(mPresenter);
initData();
ProgressUtil.startLoad(mActivity);
mUserId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
mPresenter.getAccountBalanceList(mPage, mPageSize, mUserId);
initData();
}
private void initData() {
mUserId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
int balance = getIntent().getIntExtra(Constants.ACCOUNT_BALANCE, 0);
mBind.tvAccountBalance.setText("¥" + balance);
mAdapter = new AccountBalanceAdapter(R.layout.item_account_balance_layout, null);
mBind.rlBalance.setLayoutManager(new LinearLayoutManager(this));
mBind.rlBalance.setAdapter(mAdapter);
mAdapter.disableLoadMoreIfNotFullPage(mBind.rlBalance);
mBind.swipeRefersh.setOnRefreshListener(this);
mAdapter.setOnLoadMoreListener(this, mBind.rlBalance);
mAdapter.setEnableLoadMore(false);
mBind.rlBalance.setRefreshListener(() -> {
mPage = 1;
mPresenter.getAccountBalanceList(mPage, mPageSize, mUserId);
});
mBind.rlBalance.setOnLoadMoreListener(() -> mPresenter.getAccountBalanceList(mPage, mPageSize, mUserId));
}
@Override
public void getBalanceSuccess(BasePageBean<AccountBalance> balance) {
mTotalPage = balance.getTotalPages();
mPageSize = balance.getPageSize();
if (mRefreshState == 1) {
mBind.swipeRefersh.setRefreshing(false);
mAdapter.setNewData(balance.getData());
mAdapter.loadMoreEnd();
mAdapter.setEnableLoadMore(true);
} else {
mAdapter.addData(balance.getData());
}
if (mPage >= mTotalPage) {
mAdapter.loadMoreEnd();
} else {
mAdapter.loadMoreComplete();
mPage += 1;
}
mPage += 1;
if (balance.getData().size() == 0) {
LayoutInflater inflater = LayoutInflater.from(mActivity);
View view = inflater.inflate(R.layout.tips_empty, null);
TextView tip = (TextView) view.findViewById(R.id.tv_empty);
tip.setText(getString(R.string.no_record));
mAdapter.setEmptyView(view);
}
mPage++;
mBind.rlBalance.setPageData(balance);
}
@Override
public void getBalanceError() {
mAdapter.setEmptyView(R.layout.tips_loading_failed);
mAdapter.loadMoreFail();
ToastUtils.showShortToast(getString(R.string.get_account_list_error));
mBind.lineOne.setVisibility(View.VISIBLE);
mBind.rlBalance.setDataFail();
}
@Override
......@@ -105,16 +64,8 @@ public class AccountBalanceActivity extends BaseBingdActivity<AccountBalancePres
}
@Override
public void onRefresh() {
mRefreshState = 1;
mPage = 1;
mAdapter.setEnableLoadMore(false);
mPresenter.getAccountBalanceList(mPage, mPageSize, mUserId);
}
@Override
public void onLoadMoreRequested() {
mRefreshState = 2;
mPresenter.getAccountBalanceList(mPage, mPageSize, mUserId);
public String getTotalPrice() {
int balance = getIntent().getIntExtra(Constants.ACCOUNT_BALANCE, 0);
return "¥" + balance;
}
}
package com.dayu.bigfish.ui;
import android.content.Intent;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.MyApplication;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.AccountBalance;
import com.dayu.bigfish.databinding.ActivityAccountbalanceLayoutBinding;
import com.dayu.bigfish.presenter.accountbalance.AccountBalanceContract;
import com.dayu.bigfish.presenter.accountbalance.AccountBalancePresenter;
import com.dayu.bigfish.ui.adapter.AccountBalanceAdapter;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.ToastUtils;
/**
* Created by luofan on 2017/11/1.
*/
public class AccountBalanceActivity11 extends BaseBingdActivity<AccountBalancePresenter, ActivityAccountbalanceLayoutBinding> implements AccountBalanceContract.View
, SwipeRefreshLayout.OnRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
private int mUserId;
private AccountBalanceAdapter mAdapter;
private int mPage = 1;
private int mPageSize = Constants.PAGESIZE;
private int mTotalPage = 1;
private int mRefreshState = 1; //1:刷新,2:下拉加载
@Override
public int getLayoutId() {
return R.layout.activity_accountbalance_layout11;
}
@Override
public void initView() {
mBind.setPresenter(mPresenter);
initData();
ProgressUtil.startLoad(mActivity);
mPresenter.getAccountBalanceList(mPage, mPageSize, mUserId);
}
private void initData() {
mUserId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
int balance = getIntent().getIntExtra(Constants.ACCOUNT_BALANCE, 0);
mBind.tvAccountBalance.setText("¥" + balance);
mAdapter = new AccountBalanceAdapter(R.layout.item_account_balance_layout11, null);
mBind.rlBalance.setLayoutManager(new LinearLayoutManager(this));
mBind.rlBalance.setAdapter(mAdapter);
mAdapter.disableLoadMoreIfNotFullPage(mBind.rlBalance);
mBind.swipeRefersh.setOnRefreshListener(this);
mAdapter.setOnLoadMoreListener(this, mBind.rlBalance);
mAdapter.setEnableLoadMore(false);
}
@Override
public void getBalanceSuccess(BasePageBean<AccountBalance> balance) {
mTotalPage = balance.getTotalPages();
mPageSize = balance.getPageSize();
if (mRefreshState == 1) {
mBind.swipeRefersh.setRefreshing(false);
mAdapter.setNewData(balance.getData());
mAdapter.loadMoreEnd();
mAdapter.setEnableLoadMore(true);
} else {
mAdapter.addData(balance.getData());
}
if (mPage >= mTotalPage) {
mAdapter.loadMoreEnd();
} else {
mAdapter.loadMoreComplete();
mPage += 1;
}
mPage += 1;
if (balance.getData().size() == 0) {
LayoutInflater inflater = LayoutInflater.from(mActivity);
View view = inflater.inflate(R.layout.tips_empty, null);
TextView tip = (TextView) view.findViewById(R.id.tv_empty);
tip.setText(getString(R.string.no_record));
mAdapter.setEmptyView(view);
}
}
@Override
public void getBalanceError() {
mAdapter.setEmptyView(R.layout.tips_loading_failed);
mAdapter.loadMoreFail();
ToastUtils.showShortToast(getString(R.string.get_account_list_error));
mBind.lineOne.setVisibility(View.VISIBLE);
}
@Override
public void dumpToWithdrawal() {
Intent intent = new Intent(mActivity, WithdrawalsActivity.class);
startActivity(intent);
}
@Override
public String getTotalPrice() {
int balance = getIntent().getIntExtra(Constants.ACCOUNT_BALANCE, 0);
return "¥" + balance;
}
@Override
public void onRefresh() {
mRefreshState = 1;
mPage = 1;
mAdapter.setEnableLoadMore(false);
mPresenter.getAccountBalanceList(mPage, mPageSize, mUserId);
}
@Override
public void onLoadMoreRequested() {
mRefreshState = 2;
mPresenter.getAccountBalanceList(mPage, mPageSize, mUserId);
}
}
......@@ -7,6 +7,7 @@ import android.support.v7.widget.LinearLayoutManager;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.api.APIException;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.Order;
......@@ -135,9 +136,12 @@ public class ReceivingActivity extends BaseBingdActivity<ReceivingPresenter, Act
}
@Override
public void receiveOrderFail() {
public void receiveOrderFail(APIException.ResponeThrowable throwable) {
if ("ORDER0002".equals(throwable.subCode) || "ORDER0003".equals(throwable.subCode)) {
refresh();
}
}
@Override
public void onRefresh() {
......
......@@ -8,6 +8,7 @@ import android.view.View;
import com.bigkoo.pickerview.TimePickerView;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.api.APIException;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.bean.event.OrderState;
import com.dayu.bigfish.bean.event.RefreshApoiment;
......@@ -62,11 +63,11 @@ public class SubcribeTimeActivity extends BaseBingdActivity<SubcribeTimePresente
orderId = intent.getIntExtra(Constants.ORDER_ID, 0);
finshPosition = intent.getIntExtra(Constants.ORDER_POSTION, 0);
mState = intent.getIntExtra(Constants.ORDER_STATE, 0);
if (mState == 2) {
if (mState == SUBCRIBE_TIME) {
mBind.tvTile.setText(getString(R.string.tv_home_tab_one_subscribe_time));
} else if (mState == 3) {
} else if (mState == ORDER_YUYUE) {
mBind.tvTile.setText(getString(R.string.tv_home_tab_updata_subscribe_time));
} else if (mState == 4) {
} else if (mState == ORDER_DOING) {
mBind.tvTile.setText(getString(R.string.item_restart));
}
}
......@@ -186,4 +187,18 @@ public class SubcribeTimeActivity extends BaseBingdActivity<SubcribeTimePresente
pvTime2.setDate(Calendar.getInstance());
pvTime2.show();
}
@Override
public void subcribeTimeFail(APIException.ResponeThrowable responeThrowable) {
if ("ORDER0004".equals(responeThrowable.subCode)) {
if (mState == SUBCRIBE_TIME) { //刷新待预约列表并跳转到已取消
EventBus.getDefault().post(new RefreshTab(3));
EventBus.getDefault().post(new RefreshApoiment(1));
} else if (mState == ORDER_YUYUE) {//刷新待服务列表并跳转到已取消
EventBus.getDefault().post(new RefreshTab(3));
EventBus.getDefault().post(new RefreshServe(1));
}
finish();
}
}
}
......@@ -14,6 +14,8 @@ import com.chad.library.adapter.base.BaseViewHolder;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.bean.Order;
import com.dayu.bigfish.bean.event.RefreshServe;
import com.dayu.bigfish.bean.event.RefreshTab;
import com.dayu.bigfish.presenter.serverorder.ServerOrderPresenter;
import com.dayu.bigfish.ui.ProcessOrderActivity;
import com.dayu.bigfish.ui.SopWebViewActivity;
......@@ -22,6 +24,8 @@ import com.dayu.bigfish.utils.LocationUtils;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.UtilsDate;
import org.greenrobot.eventbus.EventBus;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
......@@ -261,6 +265,11 @@ public class OrderDoingAdapter extends BaseQuickAdapter<Order, BaseViewHolder> {
mItem.setSubStatus(2);
mHolder.setText(R.id.tv_item_process, mContext.getString(R.string.begain_server));
}
}, responeThrowable -> {
if ("ORDER0005".equals(responeThrowable.subCode)) {
EventBus.getDefault().post(new RefreshTab(3));
EventBus.getDefault().post(new RefreshServe(1));
}
}));
} else if (mItem.getSubStatus() == 2) {
mPresenter.startServer(mItem.getId(), latitude, longitude)
......@@ -275,6 +284,11 @@ public class OrderDoingAdapter extends BaseQuickAdapter<Order, BaseViewHolder> {
mHolder.setText(R.id.tv_item_process, mContext.getString(R.string.process_order));
mHolder.setText(R.id.item_updata_time, mContext.getString(R.string.need_again_door));
}
}, responeThrowable -> {
if ("ORDER0006".equals(responeThrowable.subCode)) {
EventBus.getDefault().post(new RefreshTab(3));
EventBus.getDefault().post(new RefreshServe(1));
}
}));
}
}
......
......@@ -13,7 +13,6 @@ import com.dayu.bigfish.utils.UtilsDate;
import static com.dayu.bigfish.utils.UtilsDate.FORMAT_ONE;
import static com.dayu.bigfish.utils.UtilsDate.LONG_TIME_FORMAT_TWO;
import static com.dayu.bigfish.utils.UtilsDate.SHORT_DATE_FORMAT;
/**
* 异常单列表的适配器
......@@ -46,15 +45,8 @@ public class OrderThreeTabAdapter extends BaseQuickAdapter<ErrorOrder, BaseViewH
helper.setText(R.id.item_tody, mContext.getString(R.string.no_appointment));
helper.getView(R.id.item_time).setVisibility(View.GONE);
} else {
String dateMD = UtilsDate.changeFormat(time, FORMAT_ONE, SHORT_DATE_FORMAT);
String dateTime = UtilsDate.changeFormat(time, FORMAT_ONE, LONG_TIME_FORMAT_TWO);
if (UtilsDate.IsToday(time)) {
helper.setText(R.id.item_tody, mContext.getString(R.string.today));
} else if (UtilsDate.IsNextday(time)) {
helper.setText(R.id.item_tody, mContext.getString(R.string.tomorrow));
} else {
helper.setText(R.id.item_tody, dateMD);
}
helper.setText(R.id.item_tody, UtilsDate.getDayOrIsToday(time));
helper.setText(R.id.item_time, dateTime);
helper.getView(R.id.item_time).setVisibility(View.VISIBLE);
}
......
......@@ -12,6 +12,9 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.MyApplication;
import com.dayu.bigfish.R;
......@@ -66,8 +69,13 @@ public class HomePersonFragment extends BaseBingFragment<HomeFourPresenter, Frag
mBind.tvAllAchivement.setTypeface(tf);
mBind.tvOrderRecord.setTypeface(tf);
mHeaderUrl = GetUserInfo.getUserHead(mActivity);
if (!TextUtils.isEmpty(mHeaderUrl)){
mBind.setImgurl(mHeaderUrl);
if (!TextUtils.isEmpty(mHeaderUrl)) {
RequestOptions options = new RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.ALL);
Glide.with(view.getContext())
.load(mHeaderUrl)
.apply(options)
.into(mBind.ivHeader);
}
return view;
}
......@@ -114,7 +122,7 @@ public class HomePersonFragment extends BaseBingFragment<HomeFourPresenter, Frag
dialog1.dismiss();
});
dialog.setTitle(mActivity.getString(R.string.notice))
.setNegativeButton(mActivity.getString(R.string.not_set_account))
.setNegativeButton(mActivity.getString(R.string.not_set_up))
.setPositiveButton(mActivity.getString(R.string.go_set_up));
dialog.show();
}
......
......@@ -37,9 +37,7 @@ public class MessageFragment extends BaseBingFragment<messagePresenter, Lrecycle
@Override
public View initView(View view) {
mCategory = getArguments().getInt("category", 1);
if (mCategory == 1) {
initData();
}
return view;
}
......@@ -50,13 +48,9 @@ public class MessageFragment extends BaseBingFragment<messagePresenter, Lrecycle
@Override
protected void lazyLoad() {
if (mCategory == 2) {
initData();
}
}
public void initData() {
hxUserId = GetUserInfo.getHxUserId(mActivity);
ProgressUtil.startLoad(mActivity);
mPresenter.getHxMessage(hxUserId, mCategory, mPage, mPageSize);
......
package com.dayu.bigfish.ui.fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.text.TextUtils;
import android.view.View;
import com.dayu.bigfish.R;
......@@ -11,6 +12,7 @@ import com.dayu.bigfish.databinding.FragmentOrderDatailsBinding;
import com.dayu.bigfish.presenter.orderdetail.OrderDetailContract;
import com.dayu.bigfish.presenter.orderdetail.OrderDetailPresenter;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.UIUtils;
/**
......@@ -52,6 +54,14 @@ public class OrderDatailsFragment extends BaseBingFragment<OrderDetailPresenter,
}
public void initDataView(OrderDetail dataBean) {
if (!TextUtils.isEmpty(dataBean.getComment())) {
mBind.tvOrderRmark.setText(dataBean.getComment());
}
if (UIUtils.isOverFlowed(mBind.tvOrderRmark)) {
mBind.tvLookMore.setVisibility(View.VISIBLE);
} else {
mBind.tvLookMore.setVisibility(View.GONE);
}
if (dataBean.getAccessories() != null && dataBean.getAccessories().size() != 0) {
mAdapter = new CoreAdapter<String, FragmentOrderDatailsBinding>(false);
mBind.rlAccessories.setLayoutManager(new LinearLayoutManager(mActivity));
......@@ -73,5 +83,4 @@ public class OrderDatailsFragment extends BaseBingFragment<OrderDetailPresenter,
mBind.tvOrderRmark.setMaxLines(2);
}
}
}
......@@ -57,7 +57,7 @@ public class OrderThreeTabFragment extends BaseBingFragment<ErrorOrderPresenter,
}
public void initListener() {
mAdapter.setOnItemChildClickListener((adapter, view, position) -> {
mAdapter.setOnItemClickListener((adapter, view, position) -> {
ErrorOrder order = (ErrorOrder) adapter.getItem(position);
Intent intent = new Intent(mActivity, OrderDetailsActivity.class);
intent.putExtra("orderId", order.getId());
......
......@@ -5,5 +5,5 @@ package com.dayu.bigfish.ui.listener;
*/
public interface OnItemClickListener<M,B> {
void OnItemClick(M item,B bind, int position);
void OnItemClick(M item,B bind);
}
......@@ -22,6 +22,7 @@ import com.dayu.bigfish.ui.listener.OnItemClickListener;
import com.dayu.bigfish.ui.listener.OnRefreshListener;
import com.dayu.bigfish.ui.listener.onLoadMoreListener;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.ToastUtils;
import java.util.List;
......@@ -67,6 +68,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
private LinearLayoutManager mLayoutManager;
public CoreAdapter<M, B> mCoreAdapter;
private int itemType;
private LinearLayout ll_faileView;
public LRecyclerView(@NonNull Context context) {
super(context);
......@@ -100,6 +102,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
swipeRefresh = (SwipeRefreshLayout) layout.findViewById(R.id.swiperefresh);
recyclerview = (RecyclerView) layout.findViewById(R.id.recyclerview);
ll_emptyView = (LinearLayout) layout.findViewById(R.id.ll_emptyview);
ll_faileView = (LinearLayout) layout.findViewById(R.id.ll_faileview);
// swipeRefresh.setColorSchemeResources(R.color.cl_receiving_order_item_data);
mLayoutManager = new LinearLayoutManager(context);
mLayoutManager.setAutoMeasureEnabled(true);
......@@ -127,6 +130,11 @@ public class LRecyclerView<M, B> extends FrameLayout {
ProgressUtil.startLoad(mCoreAdapter.getContext());
Refresh();
}));
ll_faileView.setOnClickListener(view -> {
ProgressUtil.startLoad(mCoreAdapter.getContext());
Refresh();
});
recyclerview.addOnScrollListener(new RecyclerView.OnScrollListener() {
int lastVisibleItem;
......@@ -174,18 +182,21 @@ public class LRecyclerView<M, B> extends FrameLayout {
}
public void setEmpty() {
if ((!isHasHeadView || isReverse) && !isEmpty) {
isEmpty = true;
ll_emptyView.setVisibility(View.VISIBLE);
swipeRefresh.setVisibility(View.GONE);
}
ll_faileView.setVisibility(View.GONE);
}
public void reSetEmpty() {
if (isEmpty) {
ll_emptyView.setVisibility(View.GONE);
swipeRefresh.setVisibility(View.VISIBLE);
ll_emptyView.setVisibility(View.GONE);
ll_faileView.setVisibility(View.GONE);
}
public void setFaileView() {
ll_faileView.setVisibility(View.VISIBLE);
ll_emptyView.setVisibility(View.GONE);
swipeRefresh.setVisibility(View.GONE);
}
/**
......@@ -195,6 +206,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
*/
public void setData(List<M> data) {
if (data == null || (data != null && data.size() == 0)) {
ToastUtils.showShortToast("暂无数据");
setEmpty();
return;
}
......@@ -215,6 +227,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
swipeRefresh.setRefreshing(false);
if (isRefresh) {
if (data == null || (data != null && data.getData().size() == 0)) {
ToastUtils.showShortToast("暂无数据");
setEmpty();
return;
}
......@@ -233,7 +246,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
*/
public void setDataFail() {
if (isRefresh) {
setEmpty();
setFaileView();
} else {
mCoreAdapter.isLoadFial = true;
mCoreAdapter.notifyDataSetChanged();
......@@ -274,4 +287,13 @@ public class LRecyclerView<M, B> extends FrameLayout {
public void setPresenter(BasePresenter presenter) {
mCoreAdapter.setPresenter(presenter);
}
/**
* 获取数据源.
*
* @return
*/
public List<M> getDatas() {
return mCoreAdapter.getDatas();
}
}
......@@ -7,6 +7,9 @@ package com.dayu.bigfish.utils;
import android.annotation.SuppressLint;
import android.text.TextUtils;
import com.dayu.bigfish.MyApplication;
import com.dayu.bigfish.R;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
......@@ -1577,6 +1580,26 @@ public class UtilsDate {
return DateLocal.get();
}
/**
* 判断是否今天,明天,否则返回时间.
* @param time
* @return
*/
public static String getDayOrIsToday(String time) {
try {
if (IsToday(time)) {
return MyApplication.getContext().getString(R.string.today);
} else if (IsNextday(time)) {
return MyApplication.getContext().getString(R.string.tomorrow);
} else {
return UtilsDate.changeFormat(time, FORMAT_ONE, SHORT_DATE_FORMAT);
}
} catch (ParseException e) {
e.printStackTrace();
return "";
}
}
private static ThreadLocal<SimpleDateFormat> DateLocal = new ThreadLocal<SimpleDateFormat>();
}
<?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">
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<data>
......@@ -9,6 +10,7 @@
<variable
name="presenter"
type="AccountBalancePresenter"/>
</data>
<LinearLayout
......@@ -55,6 +57,7 @@
android:layout_height="100dp"
android:gravity="center"
android:textColor="#ffbe2d"
android:text="@{presenter.totalPrice}"
android:textSize="40sp"
/>
......@@ -67,19 +70,15 @@
android:visibility="gone"
/>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refersh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
<com.dayu.bigfish.ui.views.LRecyclerView
android:id="@+id/rl_balance"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:needCoreAdapter="true"
app:itemType="@layout/item_account_balance_layout"
>
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</com.dayu.bigfish.ui.views.LRecyclerView>
</LinearLayout>
</layout>
\ No newline at end of file
<?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">
<data>
<import type="com.dayu.bigfish.presenter.accountbalance.AccountBalancePresenter"/>
<variable
name="presenter"
type="AccountBalancePresenter"/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/time_title"
style="@style/title"
>
<TextView
android:id="@+id/title_text"
style="@style/text_title"
android:text="@string/title_account_balance"
/>
<ImageView
android:id="@+id/title_back"
style="@style/title_image_back"
android:onClick="@{()->presenter.dumpBack()}"
/>
<TextView
android:id="@+id/title_right"
style="@style/title_right_text"
android:onClick="@{()->presenter.dumpToWithdrawal()}"
android:text="@string/title_account_balance_right"
android:textColor="#3faafc"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/dp_6"
android:layout_alignParentBottom="true"
android:src="@drawable/line_shape"
/>
</RelativeLayout>
<TextView
android:id="@+id/tv_account_balance"
android:layout_width="match_parent"
android:layout_height="100dp"
android:gravity="center"
android:textColor="#ffbe2d"
android:textSize="40sp"
/>
<ImageView
android:id="@+id/line_one"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0.3"
android:layout_centerHorizontal="true"
android:background="@color/cl_order_item_line_bg"
android:visibility="gone"
/>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refersh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_balance"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -7,8 +7,6 @@
<import type="android.text.TextUtils"/>
<import type="com.dayu.bigfish.utils.UIUtils"/>
<variable
name="presenter"
type="com.dayu.bigfish.presenter.orderdetail.OrderDetailPresenter"/>
......@@ -206,13 +204,12 @@
android:id="@+id/tv_order_rmark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxEms="500"
android:maxLines="2"
android:text='@{!TextUtils.isEmpty(item.comment)?item.comment:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="13.3sp"/>
android:textSize="13sp"/>
<TextView
android:id="@+id/tv_look_more"
......@@ -223,8 +220,7 @@
android:onClick="@{()->presenter.lookMore()}"
android:text="查看更多"
android:textColor="@color/cl_receiving_order_item_data"
android:textSize="13.3sp"
android:visibility="@{UIUtils.isOverFlowed(tvOrderRmark)?View.VISIBLE:View.GONE}"/>
android:textSize="13.3sp"/>
</RelativeLayout>
......@@ -365,6 +361,8 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_five"
android:ellipsize="end"
android:maxLines="1"
android:text='@{item.provinceName+item.cityName+item.districtName+item.address}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -519,7 +517,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/line_three"
android:visibility="@{item.isPay ==2?View.VISIBLE:View.GONE}"
android:visibility="@{item.isPay ==1?View.VISIBLE:View.GONE}"
>
<TextView
......@@ -679,7 +677,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/line_three"
android:visibility="@{item.isPay ==2?View.GONE:View.VISIBLE}"
android:visibility="@{item.isPay ==1?View.GONE:View.VISIBLE}"
>
<TextView
......
......@@ -60,7 +60,6 @@
<com.dayu.bigfish.ui.views.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/iv_header"
imageUrl="@{imgurl}"
android:layout_width="@dimen/size_login_mlcircleimageview_width"
android:layout_height="@dimen/size_login_mlcircleimageview_height"
android:layout_centerHorizontal="true"
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout>
<data>
<variable
name="item"
type="com.dayu.bigfish.bean.AccountBalance"/>
</data>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="74dp"
android:orientation="horizontal"
>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentTop="true"
android:background="@color/cl_order_item_line_bg"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -22,7 +33,7 @@
android:id="@+id/item_tv_accout_source"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/order_subsidy"
android:text="@{item.operateActionComment}"
android:textColor="#3a3a3a"
android:textSize="16sp"
/>
......@@ -31,8 +42,7 @@
android:id="@+id/item_tv_accout_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2017/3/22 19:00"
android:textColor="#888888"
android:text="@{item.createTime}"
android:textSize="13.3sp"
/>
</LinearLayout>
......@@ -46,9 +56,10 @@
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_16.7"
android:gravity="end"
android:text="- 100.00"
android:textColor="#000000"
android:text='@{item.streamPrice>0?"+"+item.streamPrice:item.streamPrice+""}'
android:textColor="@{item.streamPrice>0?@color/cl_tab_yellow:@color/cl_order_text_title}"
android:textSize="20sp"/>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="item"
type="com.dayu.bigfish.bean.AccountBalance"/>
</data>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="74dp"
android:orientation="horizontal"
>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentTop="true"
android:background="@color/cl_order_item_line_bg"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_16.7"
android:orientation="vertical"
>
<TextView
android:id="@+id/item_tv_accout_source"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/order_subsidy"
android:textColor="#3a3a3a"
android:textSize="16sp"
/>
<TextView
android:id="@+id/item_tv_accout_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2017/3/22 19:00"
android:textColor="#888888"
android:textSize="13.3sp"
/>
</LinearLayout>
<TextView
android:id="@+id/item_tv_accout_balance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_16.7"
android:gravity="end"
android:text="- 100.00"
android:textColor="#000000"
android:textSize="20sp"/>
</RelativeLayout>
</layout>
\ No newline at end of file
......@@ -48,5 +48,41 @@
/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_faileview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@mipmap/error" />
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="23dp"
android:text="加载出错啦"
android:textColor="#c9c9c9"
android:textSize="17.3sp" />
<TextView
android:id="@+id/retry_btn"
android:layout_width="115dp"
android:layout_height="30dp"
android:layout_marginTop="55dp"
android:gravity="center"
android:paddingBottom="4dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="4dp"
android:text="重新加载"
android:textSize="15.4sp" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -270,6 +270,11 @@
<string name="not_engineer">该账号尚不是工程师</string>
<string name="account_frozen">该账号冻结</string>
<string name="order_cancle_not_receive">工单已取消,无法接单</string>
<string name="order_cancle_not_subcribe">工单已取消,无法预约时间</string>
<string name="order_cancle_not_begin">工单已取消,不能上门了</string>
<string name="order_cancle_not_process">工单已取消,不能处理了</string>
<string name="order_receive_already">已被接单,请选择其他工单</string>
<string name="agreement">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment