Commit 4d4f14f2 by 罗翻

增加activity的databingding

parent 70a713f5
Showing with 1082 additions and 1349 deletions
......@@ -41,7 +41,7 @@ android {
debug {
signingConfig android.signingConfigs.release
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
......@@ -52,6 +52,10 @@ android {
assets.srcDirs = ['src/main/assets', 'src/main/assets/']
}
}
dataBinding {
enabled = true
}
lintOptions {
checkReleaseBuilds false
}
......
......@@ -24,6 +24,7 @@ public class Constants {
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://192.168.1.117:8080/#/sop";
/**************************正式环境*******************************/
// public static final int DEBUGLEVEL = LogUtils.LEVEL_OFF;
......
package com.dayu.bigfish.base;
import android.app.Activity;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.dayu.bigfish.utils.InstanceUtil;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.ToastUtils;
import java.lang.reflect.ParameterizedType;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.disposables.CompositeDisposable;
/**
* Created by luo on 2017/11/14.
*/
public abstract class BaseBingFragment<P extends BasePresenter> extends Fragment {
protected Activity mActivity;
public P mPresenter;
private Unbinder mKnife;
private boolean isVisible; //是否可见状态
private boolean isPrepared; //标志位,View已经初始化完成。
private boolean isFirstLoad = true;
protected CompositeDisposable mDisposable = new CompositeDisposable();
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
onAttachToContext((Activity) context);
}
}
@SuppressWarnings("deprecation")
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
onAttachToContext(activity);
}
}
private void onAttachToContext(Activity context) {
mActivity = context;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
isFirstLoad = true;
isPrepared = true;
if (this instanceof BaseView &&
this.getClass().getGenericSuperclass() instanceof ParameterizedType &&
((ParameterizedType) (this.getClass().getGenericSuperclass())).getActualTypeArguments().length > 0) {
Class mPresenterClass = (Class) ((ParameterizedType) (this.getClass()
.getGenericSuperclass())).getActualTypeArguments()[0];
mPresenter = InstanceUtil.getInstance(mPresenterClass);
if (mPresenter != null) mPresenter.setView(this, mActivity);
}
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(getLayoutId(), container, false);
mKnife = ButterKnife.bind(this, view);
initView(view);
return view;
}
@Override
public void onDestroy() {
super.onDestroy();
mKnife.unbind();
if (mPresenter != null) mPresenter.onDetached();
mDisposable.dispose();
}
public abstract View initView(View view);
public abstract int getLayoutId();
/**
* 如果是与ViewPager一起使用,调用的是setUserVisibleHint
*/
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (getUserVisibleHint()) {
isVisible = true;
onVisible();
} else {
isVisible = false;
onInvisible();
}
}
/**
* 如果是通过FragmentTransaction的show和hide的方法来控制显示,调用的是onHiddenChanged.
* 若是初始就show的Fragment 为了触发该事件 需要先hide再show
*/
@Override
public void onHiddenChanged(boolean hidden) {
super.onHiddenChanged(hidden);
if (!hidden) {
isVisible = true;
onVisible();
} else {
isVisible = false;
onInvisible();
}
}
protected void onVisible() {
doInit();
}
protected void onInvisible() {
}
protected void doInit() {
if (!isPrepared || !isVisible || !isFirstLoad) {
return;
}
isFirstLoad = false;
lazyLoad();
}
protected abstract void lazyLoad();
public void showToast(String msg) {
ToastUtils.showShortToast(msg);
}
public void showDialog() {
ProgressUtil.startLoad(mActivity);
}
public void hideDialog() {
ProgressUtil.stopLoad();
}
}
package com.dayu.bigfish.base;
import android.databinding.ViewDataBinding;
import com.dayu.bigfish.utils.InstanceUtil;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.ToastUtils;
import java.lang.reflect.ParameterizedType;
import io.reactivex.disposables.CompositeDisposable;
/**
* Created by luofan on 17/11/02.
*/
public abstract class BaseBingdActivity<P extends BasePresenter, B extends ViewDataBinding> extends DataBindingActivity<B> {
public P mPresenter;
protected CompositeDisposable mDisposable = new CompositeDisposable();
@Override
protected void initPresenter() {
super.initPresenter();
if (this instanceof BaseView &&
this.getClass().getGenericSuperclass() instanceof ParameterizedType &&
((ParameterizedType) (this.getClass().getGenericSuperclass())).getActualTypeArguments().length > 0) {
Class mPresenterClass = (Class) ((ParameterizedType) (this.getClass()
.getGenericSuperclass())).getActualTypeArguments()[0];
mPresenter = InstanceUtil.getInstance(mPresenterClass);
if (mPresenter != null) mPresenter.setView(this, this);
}
}
@Override
protected void onDestroy() {
super.onDestroy();
if (mPresenter != null) {
mPresenter.onDetached();
}
mDisposable.dispose();
}
public void showToast(String msg) {
ToastUtils.showShortToast(msg);
}
public void showDialog() {
ProgressUtil.startLoad(this);
}
public void hideDialog() {
ProgressUtil.stopLoad();
}
}
......@@ -64,7 +64,7 @@ public abstract class BaseFragment<P extends BasePresenter> extends Fragment {
Class mPresenterClass = (Class) ((ParameterizedType) (this.getClass()
.getGenericSuperclass())).getActualTypeArguments()[0];
mPresenter = InstanceUtil.getInstance(mPresenterClass);
if (mPresenter != null) mPresenter.setView(this, getActivity());
if (mPresenter != null) mPresenter.setView(this, mActivity);
}
}
......
......@@ -132,8 +132,8 @@ public abstract class BasePresenter<V> {
}
return;
}
if (mView instanceof BaseActivity) {
((BaseActivity) mView).showToast(message);
if (mView instanceof BaseBingdActivity) {
((BaseBingdActivity) mView).showToast(message);
} else if (mView instanceof BaseFragment) {
((BaseFragment) mView).showToast(message);
}
......
package com.dayu.bigfish.base;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.widget.ImageView;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.jsbridge.BridgeWebView;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* Created by luofan on 2017/11/27.
*/
public abstract class BaseWebViewActivity extends AppCompatActivity {
@BindView(R.id.webView)
BridgeWebView mWebView;
@BindView(R.id.receiving_back)
ImageView mBackTitle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.activity_webview_layout);
ButterKnife.bind(this);
mBackTitle.setOnClickListener(o -> finish());
initWebView();
initListener();
}
private void initWebView() {
WebSettings settings = mWebView.getSettings();
// >= 19(SDK4.4)启动硬件加速,否则启动软件加速
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
mWebView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
settings.setLoadsImagesAutomatically(true); //支持自动加载图片
} else {
mWebView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
settings.setLoadsImagesAutomatically(false);
}
settings.setUseWideViewPort(true);//设定支持viewport
settings.setLoadWithOverviewMode(true);//自适应屏幕
settings.setDomStorageEnabled(true);
settings.setSaveFormData(true);
//settings.setSupportMultipleWindows(true);
settings.setAppCacheEnabled(true);
settings.setCacheMode(WebSettings.LOAD_NO_CACHE); //优先使用缓存
settings.setJavaScriptEnabled(true); //启用支持javascript
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setSupportZoom(true);//设定支持缩放
settings.setBuiltInZoomControls(true); //make sure your pinch zoom is enabled
settings.setDisplayZoomControls(false);//don't show the zoom controls
//5.0 以上 webView图片不显示 以下没问题
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
mWebView.setVerticalScrollbarOverlay(false); //指定的垂直滚动条有叠加样式
mWebView.setVerticalScrollBarEnabled(true);
mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER); // 取消WebView中滚动或拖动到顶部、底部时的阴影
mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); // 取消滚动条白边效果
mWebView.requestFocus();
mWebView.setWebChromeClient(new WebChromeClient());
mWebView.loadUrl(Constants.WEB_SOP);
}
public abstract void initListener();
//返回
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
mWebView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
public void onResume() {//
super.onResume();
mWebView.onResume();
}
@Override
protected void onDestroy() {
super.onDestroy();
mWebView.stopLoading();//音频退出
mWebView.destroy();
}
}
package com.dayu.bigfish.base;
import android.app.Activity;
import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
public abstract class DataBindingActivity<B extends ViewDataBinding> extends AppCompatActivity {
public Activity mActivity;
public B mBind;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View rootView = getLayoutInflater().inflate(this.getLayoutId(), null, false);
mBind = DataBindingUtil.bind(rootView);
this.setContentView(rootView);
mActivity = this;
initPresenter();
initView();
}
protected void initPresenter() {
}
public abstract int getLayoutId();
public abstract void initView();
}
package com.dayu.bigfish.base;
import android.app.Activity;
import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public abstract class DataBindingFragment<B extends ViewDataBinding> extends Fragment {
public B mBind;
protected Activity mActivity;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(getLayoutId(), container, false);
DataBindingUtil.inflate(inflater, getLayoutId(), container, false);
initPresenter();
initView();
return view;
}
protected void initPresenter() {
}
public abstract int getLayoutId();
public abstract void initView();
}
......@@ -104,15 +104,15 @@ public class OrderDetail {
private Object customerCheckComment;
private Object isPay;
private Object payType;
private Object doorPrice;
private Integer doorPrice;
private Object doorPriceComment;
private Object servicePrice;
private Integer servicePrice;
private Object servicePriceComment;
private Object materialCost;
private Integer materialCost;
private Object materialCostComment;
private Object otherPrice;
private Integer otherPrice;
private Object otherPriceComment;
private Object totalPrice;
private Integer totalPrice;
private Object cancelOrderReason;
private Object closePhase;
private int siteId;
......@@ -124,17 +124,9 @@ public class OrderDetail {
private String sn;
private String spuName;
private String spuId;
private int anyContacts;
private Integer anyContacts;
private List<accessories> accessories;
public int getAnyContacts() {
return anyContacts;
}
public void setAnyContacts(int anyContacts) {
this.anyContacts = anyContacts;
}
public int getId() {
return id;
}
......@@ -183,6 +175,14 @@ public class OrderDetail {
this.status = status;
}
public int getSubStatus() {
return subStatus;
}
public void setSubStatus(int subStatus) {
this.subStatus = subStatus;
}
public int getRepairType() {
return repairType;
}
......@@ -439,11 +439,11 @@ public class OrderDetail {
this.payType = payType;
}
public Object getDoorPrice() {
public Integer getDoorPrice() {
return doorPrice;
}
public void setDoorPrice(Object doorPrice) {
public void setDoorPrice(Integer doorPrice) {
this.doorPrice = doorPrice;
}
......@@ -455,11 +455,11 @@ public class OrderDetail {
this.doorPriceComment = doorPriceComment;
}
public Object getServicePrice() {
public Integer getServicePrice() {
return servicePrice;
}
public void setServicePrice(Object servicePrice) {
public void setServicePrice(Integer servicePrice) {
this.servicePrice = servicePrice;
}
......@@ -471,11 +471,11 @@ public class OrderDetail {
this.servicePriceComment = servicePriceComment;
}
public Object getMaterialCost() {
public Integer getMaterialCost() {
return materialCost;
}
public void setMaterialCost(Object materialCost) {
public void setMaterialCost(Integer materialCost) {
this.materialCost = materialCost;
}
......@@ -487,11 +487,11 @@ public class OrderDetail {
this.materialCostComment = materialCostComment;
}
public Object getOtherPrice() {
public Integer getOtherPrice() {
return otherPrice;
}
public void setOtherPrice(Object otherPrice) {
public void setOtherPrice(Integer otherPrice) {
this.otherPrice = otherPrice;
}
......@@ -503,11 +503,11 @@ public class OrderDetail {
this.otherPriceComment = otherPriceComment;
}
public Object getTotalPrice() {
public Integer getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(Object totalPrice) {
public void setTotalPrice(Integer totalPrice) {
this.totalPrice = totalPrice;
}
......@@ -583,14 +583,6 @@ public class OrderDetail {
this.sn = sn;
}
public int getSubStatus() {
return subStatus;
}
public void setSubStatus(int subStatus) {
this.subStatus = subStatus;
}
public String getSpuName() {
return spuName;
}
......@@ -607,6 +599,14 @@ public class OrderDetail {
this.spuId = spuId;
}
public Integer getAnyContacts() {
return anyContacts;
}
public void setAnyContacts(Integer anyContacts) {
this.anyContacts = anyContacts;
}
public List<OrderDetail.accessories> getAccessories() {
return accessories;
}
......@@ -615,7 +615,6 @@ public class OrderDetail {
this.accessories = accessories;
}
public static class RecordBean {
/**
* id : 174
......
......@@ -3,6 +3,7 @@ package com.dayu.bigfish.presenter.feedback;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.base.BaseView;
import com.dayu.bigfish.ui.FeedBackActivity;
/**
......@@ -14,7 +15,7 @@ public interface FeedBackContract {
void comfirmSuccess();
}
abstract class Presenter extends BasePresenter<View> {
abstract class Presenter extends BasePresenter<FeedBackActivity> {
public abstract void comFirmSuggist(String comment, String userName, String mobile);
}
......
package com.dayu.bigfish.presenter.feedback;
import android.text.TextUtils;
import com.app.annotation.apt.InstanceFactory;
import com.apt.ApiFactory;
import com.dayu.bigfish.R;
import org.json.JSONObject;
......@@ -24,6 +27,10 @@ public class FeedBackPresenter extends FeedBackContract.Presenter {
@Override
public void comFirmSuggist(String comment, String userName, String mobile) {
if (TextUtils.isEmpty(comment)) {
mView.showToast(mActivity.getString(R.string.input_feedback));
return;
}
HashMap<String, Object> params = new HashMap<>();
params.put("comment", comment);
params.put("created", userName);
......
......@@ -83,5 +83,7 @@ public interface LoginContract {
*/
public abstract void login(String userPhone, String register);
public abstract void dumpAgreement();
}
}
......@@ -76,4 +76,9 @@ public class LoginPresenter extends LoginContract.Presenter {
}
}));
}
@Override
public void dumpAgreement() {
mView.dumpAgreement();
}
}
......@@ -66,7 +66,7 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
params.put("pics", str);
}
} else {
params.put("pics", "null");
params.put("pics", null);
}
JSONObject jsonObject = new JSONObject(params);
RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString());
......
package com.dayu.bigfish.ui;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.ImageView;
import com.dayu.bigfish.R;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.dayu.bigfish.base.DataBindingActivity;
import com.dayu.bigfish.databinding.ActivityAboutUsBinding;
/**
* 关于我们
* on 2017/9/21.
* Created by MrWang
* Created by luofan on 2017/12/06.
*/
public class AboutUs extends Activity {
@BindView(R.id.about_back)
ImageView aboutBack;
public class AboutUs extends DataBindingActivity<ActivityAboutUsBinding> {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about_us);
ButterKnife.bind(this);
public int getLayoutId() {
return R.layout.activity_about_us;
}
@OnClick(R.id.about_back)
public void onViewClicked() {
finish();
@Override
public void initView() {
mBind.ivBack.setOnClickListener(o -> finish());
}
}
......@@ -3,19 +3,18 @@ package com.dayu.bigfish.ui;
import android.content.Intent;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
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.BaseActivity;
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;
......@@ -23,22 +22,12 @@ import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.ToastUtils;
import butterknife.BindView;
import butterknife.OnClick;
/**
* Created by luofan on 2017/11/1.
*/
public class AccountBalanceActivity extends BaseActivity<AccountBalancePresenter> implements AccountBalanceContract.View, SwipeRefreshLayout.OnRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
@BindView(R.id.tv_account_balance)
TextView mAccountBalanceTv;
@BindView(R.id.recycler_balance)
RecyclerView mRecyclerView;
@BindView(R.id.line_one)
ImageView mLine;
@BindView(R.id.swipe_refersh)
SwipeRefreshLayout mRefreshLayout;
public class AccountBalanceActivity extends BaseBingdActivity<AccountBalancePresenter, ActivityAccountbalanceLayoutBinding> implements AccountBalanceContract.View
, SwipeRefreshLayout.OnRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
private int mUserId;
private AccountBalanceAdapter mAdapter;
private int mPage = 1;
......@@ -61,38 +50,28 @@ public class AccountBalanceActivity extends BaseActivity<AccountBalancePresenter
private void initData() {
mUserId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
int balance = getIntent().getIntExtra(Constants.ACCOUNT_BALANCE, 0);
mAccountBalanceTv.setText("¥" + balance);
mBind.tvAccountBalance.setText("¥" + balance);
mAdapter = new AccountBalanceAdapter(R.layout.item_account_balance_layout, null);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setAdapter(mAdapter);
mAdapter.disableLoadMoreIfNotFullPage(mRecyclerView);
mRefreshLayout.setOnRefreshListener(this);
mAdapter.setOnLoadMoreListener(this, mRecyclerView);
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);
}
@OnClick({R.id.receiving_back, R.id.title_right})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.receiving_back:
mActivity.finish();
break;
case R.id.title_right:
mBind.titleBack.setOnClickListener(o -> finish());
mBind.titleRight.setOnClickListener(o -> {
Intent intent = new Intent(mActivity, WithdrawalsActivity.class);
startActivity(intent);
break;
default:
break;
});
}
}
@Override
public void getBalanceSuccess(BasePageBean<AccountBalance> balance) {
mTotalPage = balance.getTotalPages();
mPageSize = balance.getPageSize();
if (mRefreshState == 1) {
mRefreshLayout.setRefreshing(false);
mBind.swipeRefersh.setRefreshing(false);
mAdapter.setNewData(balance.getData());
mAdapter.loadMoreEnd();
mAdapter.setEnableLoadMore(true);
......@@ -120,7 +99,7 @@ public class AccountBalanceActivity extends BaseActivity<AccountBalancePresenter
mAdapter.setEmptyView(R.layout.tips_loading_failed);
mAdapter.loadMoreFail();
ToastUtils.showShortToast(getString(R.string.get_account_list_error));
mLine.setVisibility(View.VISIBLE);
mBind.lineOne.setVisibility(View.VISIBLE);
}
@Override
......
package com.dayu.bigfish.ui;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.dayu.bigfish.R;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.dayu.bigfish.base.DataBindingActivity;
import com.dayu.bigfish.databinding.ActivityAgreementBinding;
/**
* Created by luofan on 2017/11/13.
*/
public class AgreementActivity extends AppCompatActivity {
public class AgreementActivity extends DataBindingActivity<ActivityAgreementBinding> {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_agreement);
ButterKnife.bind(this);
public int getLayoutId() {
return R.layout.activity_agreement;
}
@OnClick({R.id.receiving_back})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.receiving_back:
finish();
break;
}
@Override
public void initView() {
mBind.titleBack.setOnClickListener(o -> finish());
}
}
package com.dayu.bigfish.ui;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.databinding.ActivityFeedbackBinding;
import com.dayu.bigfish.presenter.feedback.FeedBackContract;
import com.dayu.bigfish.presenter.feedback.FeedBackPresenter;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.ToastUtils;
import butterknife.BindView;
import butterknife.OnClick;
/**
* 设置页面 --反馈提交
* on 2017/9/26.
* Created by yu
*/
public class FeedBackActivity extends BaseActivity<FeedBackPresenter> implements FeedBackContract.View {
@BindView(R.id.text_content)
EditText textContent;
private String comment;
public class FeedBackActivity extends BaseBingdActivity<FeedBackPresenter, ActivityFeedbackBinding> implements FeedBackContract.View {
private String mComment;
private String userName;
private String userPhone;
@Override
public int getLayoutId() {
return R.layout.activity_idea;
return R.layout.activity_feedback;
}
@Override
public void initView() {
userName = GetUserInfo.getUserName(this);
userPhone = GetUserInfo.getUserPhone(this);
mBind.titleBack.setOnClickListener(o -> finish());
mBind.submitIdea.setOnClickListener(o -> {
mComment = mBind.etContent.getText().toString();
mPresenter.comFirmSuggist(mComment, userName, userPhone);
});
}
@OnClick({R.id.back_image, R.id.submit_idea})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.back_image:
finish();
break;
case R.id.submit_idea:
comment = textContent.getText().toString();
if (TextUtils.isEmpty(comment)) {
ToastUtils.showShortToast(getString(R.string.input_feedback));
return;
}
mPresenter.comFirmSuggist(comment, userName, userPhone);
break;
}
}
@Override
public void comfirmSuccess() {
......
......@@ -2,17 +2,13 @@ package com.dayu.bigfish.ui;
import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.bean.UserInfo;
import com.dayu.bigfish.databinding.ActivityLoginBinding;
import com.dayu.bigfish.presenter.login.LoginContract;
import com.dayu.bigfish.presenter.login.LoginPresenter;
import com.dayu.bigfish.ui.views.ClearEditText;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.TimeCountUtil;
import com.dayu.bigfish.utils.ToastUtils;
......@@ -20,27 +16,18 @@ import com.dayu.bigfish.utils.managers.UserManager;
import com.hyphenate.EMCallBack;
import com.hyphenate.chat.EMClient;
import butterknife.BindView;
import butterknife.OnClick;
/**
* 工程师登录页面
* 2017/11/08.
*/
public class LoginActivity extends BaseActivity<LoginPresenter> implements LoginContract.View {
@BindView(R.id.edit_phone)
ClearEditText editPhone;
@BindView(R.id.edit_register)
EditText editRegister;
@BindView(R.id.tv_voice_code)
TextView mVoiceCode;
@BindView(R.id.btn_register_send_code)
Button btnRegisterSendCode;
public class LoginActivity extends BaseBingdActivity<LoginPresenter, ActivityLoginBinding> implements LoginContract.View {
private String hxUserId;
private String hxUserPwd;
private int mType;
private String mPhone;
private String mCode;
@Override
public int getLayoutId() {
......@@ -49,6 +36,26 @@ public class LoginActivity extends BaseActivity<LoginPresenter> implements Login
@Override
public void initView() {
mBind.btnSendCode.setOnClickListener(o -> {
getData();
mType = 1;
sendCode(mPhone, mType);
});
mBind.btnLogin.setOnClickListener(o -> {
getData();
login(mPhone, mCode);
});
mBind.tvVoiceCode.setOnClickListener(o -> {
getData();
mType = 2;
sendCode(mPhone, mType);
});
mBind.tvAgreement.setOnClickListener(o -> dumpAgreement());
}
private void getData() {
mPhone = mBind.etPhone.getText().toString();
mCode = mBind.etCode.getText().toString();
}
@Override
......@@ -100,7 +107,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter> implements Login
if (mType == 1) {
ToastUtils.showShortToast(getString(R.string.login_sms_success));
} else if (mType == 2) {
mVoiceCode.setText(getString(R.string.login_voice_sms_success));
mBind.tvVoiceCode.setText(getString(R.string.login_voice_sms_success));
}
}
......@@ -112,15 +119,15 @@ public class LoginActivity extends BaseActivity<LoginPresenter> implements Login
@Override
public void changeCodeButton() {
TimeCountUtil timeCountUtil = new TimeCountUtil(mActivity, 60000, 1000, btnRegisterSendCode);
TimeCountUtil timeCountUtil = new TimeCountUtil(mActivity, 60000, 1000, mBind.btnSendCode);
timeCountUtil.start();
ProgressUtil.startLoad(mActivity);
}
@Override
public void changeVoiceCodeButton() {
mVoiceCode.setTextColor(getResources().getColor(R.color.cl_text));
mVoiceCode.setClickable(false);
mBind.tvVoiceCode.setTextColor(getResources().getColor(R.color.cl_text));
mBind.tvVoiceCode.setClickable(false);
}
@Override
......@@ -129,29 +136,6 @@ public class LoginActivity extends BaseActivity<LoginPresenter> implements Login
startActivity(intent);
}
@OnClick({R.id.btn_register_send_code, R.id.register_button, R.id.tv_voice_code, R.id.tv_agreement})
public void onViewClicked(View view) {
String userPhone = editPhone.getText().toString();
String register = editRegister.getText().toString();
switch (view.getId()) {
case R.id.btn_register_send_code:
mType = 1;
sendCode(userPhone, mType);
break;
case R.id.tv_voice_code:
mType = 2;
sendCode(userPhone, mType);
break;
case R.id.register_button:
login(userPhone, register);
break;
case R.id.tv_agreement:
dumpAgreement();
break;
}
}
@Override
public void onDestroy() {
super.onDestroy();
......
......@@ -18,7 +18,6 @@ import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.FileProvider;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
......@@ -26,7 +25,7 @@ import com.dayu.bigfish.BuildConfig;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.api.DownloadService;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.InformBean;
import com.dayu.bigfish.bean.Order;
......@@ -34,6 +33,7 @@ import com.dayu.bigfish.bean.VersionInfo;
import com.dayu.bigfish.bean.event.DownloadBean;
import com.dayu.bigfish.bean.event.RefreshReceivingNum;
import com.dayu.bigfish.bean.event.SwtichFragment;
import com.dayu.bigfish.databinding.ActivityMainBinding;
import com.dayu.bigfish.presenter.main.MainContract;
import com.dayu.bigfish.presenter.main.MainPresenter;
import com.dayu.bigfish.ui.fragment.HomeFirstTabFragment;
......@@ -55,28 +55,13 @@ import org.greenrobot.eventbus.ThreadMode;
import java.io.File;
import butterknife.BindView;
import butterknife.OnClick;
import static com.dayu.bigfish.InitializeActivity.SDK_PERMISSION_REQUEST;
/**
* Created by luofan on 2017/11/20.
*/
public class MainActivity extends BaseActivity<MainPresenter> implements MainContract.View {
@BindView(R.id.tab_first)
TextView mTabFirst;
@BindView(R.id.tab_second)
TextView mTabSecond;
@BindView(R.id.tab_third)
TextView mTabThird;
@BindView(R.id.tab_four)
TextView mTabFour;
@BindView(R.id.tab_order_num)
TextView mGetOrderTv;
@BindView(R.id.iv_message)
ImageView mMessageRedIcon;
public class MainActivity extends BaseBingdActivity<MainPresenter, ActivityMainBinding> implements MainContract.View {
private int mPosition = 0;
private FragmentManager mFragmentManger;
private Fragment[] mFragments;
......@@ -92,12 +77,11 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
@Override
public int getLayoutId() {
return R.layout.activity_main_layout;
return R.layout.activity_main;
}
@Override
public void initView() {
requestpermission();
mAccountId = GetUserInfo.getACCOUNT_ID(mActivity);
mSiteId = GetUserInfo.getSITE_ID(mActivity);
firstFragment = HomeFirstTabFragment.newInstance();
......@@ -105,53 +89,48 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
thirdFragment = HomeMessageTabFragment.newInstance();
fourFragment = HomePersonFragment.newInstance();
mFragments = new Fragment[]{firstFragment, secondFragment, thirdFragment, fourFragment};
mTabs = new TextView[]{mTabFirst, mTabSecond, mTabThird, mTabFour};
mTabs = new TextView[]{mBind.tabFirst, mBind.tabSecond, mBind.tabThird, mBind.tabFour};
requestpermission();
addFragment();
resetSelected(1);
showHideFragment(mFragments[1], mFragments[mPosition]);
mPosition = 1;
doAction(getIntent());
request();
initListener();
EventBus.getDefault().register(this);
}
private void request() {
mPresenter.commitVersionInfo(mAccountId, AppUtils.getIMEI(mActivity), "2", AppUtils.getPackageNum(mActivity));
mPresenter.getNewVersion(AppUtils.getPackageNum(mActivity));
mPresenter.getReceiveOrder(Constants.WATING_ORDER, mAccountId, mSiteId, 1, 20);
mPresenter.getHxNum(GetUserInfo.getHxUserId(mActivity));
}
@OnClick({R.id.tab_first, R.id.tab_second, R.id.tab_third, R.id.tab_four, R.id.tab_get_order})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tab_first:
private void initListener() {
mBind.tabFirst.setOnClickListener(o -> {
showHideFragment(mFragments[0], mFragments[mPosition]);
resetSelected(0);
mPosition = 0;
break;
case R.id.tab_second:
});
mBind.tabSecond.setOnClickListener(o -> {
showHideFragment(mFragments[1], mFragments[mPosition]);
resetSelected(1);
mPosition = 1;
break;
case R.id.tab_third:
});
mBind.tabThird.setOnClickListener(o -> {
showHideFragment(mFragments[2], mFragments[mPosition]);
resetSelected(2);
mMessageRedIcon.setVisibility(View.GONE);
mBind.ivMessage.setVisibility(View.GONE);
mPosition = 2;
break;
case R.id.tab_four:
});
mBind.tabFour.setOnClickListener(o -> {
showHideFragment(mFragments[3], mFragments[mPosition]);
resetSelected(3);
mPosition = 3;
break;
case R.id.tab_get_order:
dumpReceActivity();
break;
default:
break;
});
mBind.tabGetOrder.setOnClickListener(o -> dumpReceActivity());
}
private void request() {
mPresenter.commitVersionInfo(mAccountId, AppUtils.getIMEI(mActivity), "2", AppUtils.getPackageNum(mActivity));
mPresenter.getNewVersion(AppUtils.getPackageNum(mActivity));
mPresenter.getReceiveOrder(Constants.WATING_ORDER, mAccountId, mSiteId, 1, 20);
mPresenter.getHxNum(GetUserInfo.getHxUserId(mActivity));
}
@Override
......@@ -172,15 +151,15 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
@Override
public void getReceiveOrderSuccess(BasePageBean<Order> orders) {
mGetOrderTv.setText(orders.getTotalRows() + "");
mBind.tabOrderNum.setText(orders.getTotalRows() + "");
}
@Override
public void isShowRedIcon(boolean flag) {
if (mPosition != 2) {
mMessageRedIcon.setVisibility(View.VISIBLE);
mBind.ivMessage.setVisibility(View.VISIBLE);
} else {
mMessageRedIcon.setVisibility(View.GONE);
mBind.ivMessage.setVisibility(View.GONE);
}
}
......@@ -288,14 +267,14 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
@Subscribe(threadMode = ThreadMode.MAIN)
public void recevieNum(RefreshReceivingNum event) {
mGetOrderTv.setText(event.getTabNum() + "");
mBind.tabOrderNum.setText(event.getTabNum() + "");
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void swtichfragment(SwtichFragment event) {
showHideFragment(mFragments[event.getPosition()], mFragments[mPosition]);
resetSelected(mPosition);
mTabSecond.setSelected(true);
mBind.tabSecond.setSelected(true);
}
@Subscribe(threadMode = ThreadMode.MAIN)
......@@ -348,7 +327,7 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
}
resetSelected(2);
showHideFragment(mFragments[2], mFragments[mPosition]);
mMessageRedIcon.setVisibility(View.GONE);
mBind.ivMessage.setVisibility(View.GONE);
thirdFragment.setIndex(secondIndex);
thirdFragment.swtichFragment(secondIndex);
mPosition = 2;
......
......@@ -4,13 +4,10 @@ import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.DataBindingActivity;
import com.dayu.bigfish.databinding.ActivityOrderDetailsBinding;
import com.dayu.bigfish.ui.adapter.FragmentOrderAdapter;
import com.dayu.bigfish.ui.fragment.OrderDatailsFragment;
import com.dayu.bigfish.ui.fragment.OrderDatailsServeFragment;
......@@ -19,24 +16,12 @@ import com.dayu.bigfish.utils.TabLayoutUtils;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* 工单详情信息页面,包含工单详情和服务记录
* on 2017/9/13.
*/
public class OrderDetailsActivity extends FragmentActivity {
@BindView(R.id.order_back)
ImageView orderBack;
@BindView(R.id.text_title)
TextView textTitle;
@BindView(R.id.tablayout)
TabLayout tablayout;
@BindView(R.id.view_pager)
ViewPager viewPager;
public class OrderDetailsActivity extends DataBindingActivity<ActivityOrderDetailsBinding> {
private List<Fragment> list;
private FragmentOrderAdapter fragmentAdapter;
private int orderId;
......@@ -45,16 +30,18 @@ public class OrderDetailsActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_order_details);
ButterKnife.bind(this);
public int getLayoutId() {
return R.layout.activity_order_details;
}
@Override
public void initView() {
initData();
Bundle bundle = new Bundle();
bundle.putInt("orderId", orderId);
orderDatailsFragment.setArguments(bundle);
orderDatailsServeFragment.setArguments(bundle);
mBind.titleBack.setOnClickListener(o -> finish());
}
public void initData() {
......@@ -66,21 +53,12 @@ public class OrderDetailsActivity extends FragmentActivity {
orderDatailsServeFragment = new OrderDatailsServeFragment();
list.add(orderDatailsServeFragment);
fragmentAdapter = new FragmentOrderAdapter(getSupportFragmentManager(), list);
viewPager.setAdapter(fragmentAdapter);
tablayout.setupWithViewPager(viewPager);
tablayout.removeAllTabs();
tablayout.addTab(tablayout.newTab().setText(getString(R.string.order_detail)));
tablayout.addTab(tablayout.newTab().setText(getString(R.string.server_record)));
tablayout.setTabMode(TabLayout.MODE_FIXED);
TabLayoutUtils.setIndicator(tablayout, 60, 60, R.color.cl_receiving_order_item_data, this);
}
@OnClick({R.id.order_back, R.id.tablayout})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.order_back:
finish();
break;
}
mBind.viewPager.setAdapter(fragmentAdapter);
mBind.tablayout.setupWithViewPager(mBind.viewPager);
mBind.tablayout.removeAllTabs();
mBind.tablayout.addTab(mBind.tablayout.newTab().setText(getString(R.string.order_detail)));
mBind.tablayout.addTab(mBind.tablayout.newTab().setText(getString(R.string.server_record)));
mBind.tablayout.setTabMode(TabLayout.MODE_FIXED);
TabLayoutUtils.setIndicator(mBind.tablayout, 60, 60, R.color.cl_receiving_order_item_data, this);
}
}
......@@ -4,23 +4,19 @@ import android.content.Context;
import android.content.Intent;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.RelativeLayout;
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.BaseActivity;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.Order;
import com.dayu.bigfish.databinding.ActivityOrderRecordBinding;
import com.dayu.bigfish.presenter.worksRecord.WorksRecordPresenter;
import com.dayu.bigfish.presenter.worksRecord.WroksRecordContract;
import com.dayu.bigfish.ui.adapter.OrderDoingAdapter;
......@@ -29,30 +25,15 @@ import com.dayu.bigfish.utils.ProgressUtil;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.OnClick;
/**
* 工单记录,展示已完成的订单
* on 2017/9/29.
*/
public class OrderRecordActivity extends BaseActivity<WorksRecordPresenter> implements WroksRecordContract.View, BaseQuickAdapter.RequestLoadMoreListener, SwipeRefreshLayout.OnRefreshListener {
@BindView(R.id.title_text)
TextView titleText;
@BindView(R.id.time_title)
RelativeLayout timeTitle;
@BindView(R.id.et_seacher)
EditText etSeacher;
@BindView(R.id.time_seacher)
RelativeLayout mSeacher;
@BindView(R.id.rl_record)
RecyclerView mRecyclerView;
@BindView(R.id.receiving_refersh)
SwipeRefreshLayout mRefreshLayout;
public class OrderRecordActivity extends BaseBingdActivity<WorksRecordPresenter, ActivityOrderRecordBinding> implements WroksRecordContract.View, BaseQuickAdapter.RequestLoadMoreListener, SwipeRefreshLayout.OnRefreshListener {
public ArrayList<Order> mList = new ArrayList<>();
private int siteId = GetUserInfo.getSITE_ID(MyApplication.getContext());
private int userId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
private int siteId;
private int userId;
private OrderDoingAdapter mAdapter;
private int mPage = 1;
private int mPageSize = Constants.PAGESIZE;
......@@ -61,24 +42,39 @@ public class OrderRecordActivity extends BaseActivity<WorksRecordPresenter> impl
@Override
public int getLayoutId() {
return R.layout.activity_worksheet_record;
return R.layout.activity_order_record;
}
@Override
public void initView() {
titleText.setText(getString(R.string.history_order));
siteId = GetUserInfo.getSITE_ID(mActivity);
userId = GetUserInfo.getACCOUNT_ID(mActivity);
mBind.tvTitle.setText(getString(R.string.history_order));
mAdapter = new OrderDoingAdapter(R.layout.fragment_orderdoing_item, mActivity);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setAdapter(mAdapter);
mAdapter.disableLoadMoreIfNotFullPage(mRecyclerView);
mRefreshLayout.setOnRefreshListener(this);
mAdapter.setOnLoadMoreListener(this, mRecyclerView);
mBind.rlRecord.setLayoutManager(new LinearLayoutManager(this));
mBind.rlRecord.setAdapter(mAdapter);
mAdapter.disableLoadMoreIfNotFullPage(mBind.rlRecord);
mBind.swipeRefersh.setOnRefreshListener(this);
mAdapter.setOnLoadMoreListener(this, mBind.rlRecord);
initListener();
mAdapter.setEnableLoadMore(false);
ProgressUtil.startLoad(mActivity);
mPresenter.getWorksRecord(Constants.FINISH_ORDER, userId, siteId, mPage, mPageSize);
}
private void initListener() {
mBind.titleBack.setOnClickListener(o -> finish());
mBind.ivSaecher.setOnClickListener(o -> {
mBind.rlTitle.setVisibility(View.GONE);
mBind.rlSeacher.setVisibility(View.VISIBLE);
});
mBind.tvCancel.setOnClickListener(o -> hideSearch());
mAdapter.setOnItemClickListener((adapter, view, position) -> {
Order data = (Order) adapter.getData().get(position);
dumpDetail(data.getId());
});
etSeacher.addTextChangedListener(new TextWatcher() {
mBind.etSeacher.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
......@@ -96,9 +92,6 @@ public class OrderRecordActivity extends BaseActivity<WorksRecordPresenter> impl
}
});
mAdapter.setEnableLoadMore(false);
ProgressUtil.startLoad(mActivity);
mPresenter.getWorksRecord(Constants.FINISH_ORDER, userId, siteId, mPage, mPageSize);
}
......@@ -118,27 +111,11 @@ public class OrderRecordActivity extends BaseActivity<WorksRecordPresenter> impl
}
@OnClick({R.id.receiving_back, R.id.iv_saecher, R.id.quit})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.receiving_back:
finish();
break;
case R.id.iv_saecher:
timeTitle.setVisibility(View.GONE);
mSeacher.setVisibility(View.VISIBLE);
break;
case R.id.quit:
hideSearch();
break;
}
}
public void hideSearch() {
try {
etSeacher.setText("");
mSeacher.setVisibility(View.GONE);
timeTitle.setVisibility(View.VISIBLE);
mBind.etSeacher.setText("");
mBind.rlSeacher.setVisibility(View.GONE);
mBind.rlTitle.setVisibility(View.VISIBLE);
mAdapter.notifyDataSetChanged();
InputMethodManager imm = (InputMethodManager) mActivity
.getSystemService(Context.INPUT_METHOD_SERVICE);
......@@ -158,7 +135,7 @@ public class OrderRecordActivity extends BaseActivity<WorksRecordPresenter> impl
mTotalPage = oredrs.getTotalPages();
mPageSize = oredrs.getPageSize();
if (mRefreshState == 1) {
mRefreshLayout.setRefreshing(false);
mBind.swipeRefersh.setRefreshing(false);
mAdapter.setNewData(oredrs.getData());
mList.clear();
mList.addAll(oredrs.getData());
......@@ -183,7 +160,7 @@ public class OrderRecordActivity extends BaseActivity<WorksRecordPresenter> impl
mAdapter.loadMoreFail();
mAdapter.setEnableLoadMore(true);
mAdapter.setEmptyView(R.layout.tips_loading_failed);
mRefreshLayout.setRefreshing(false);
mBind.swipeRefersh.setRefreshing(false);
mAdapter.getEmptyView().setOnClickListener(v -> {
ProgressUtil.startLoad(mActivity);
mPresenter.getWorksRecord(Constants.FINISH_ORDER, userId, siteId, mPage, mPageSize);
......
package com.dayu.bigfish.ui;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.DataBindingActivity;
import com.dayu.bigfish.databinding.ActivtyPreviewBinding;
import com.dayu.bigfish.utils.GlideImageLoader;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* 选中图片页面
* on 2016/12/2.
* Created by MrWang
*/
public class PreviewActivty extends Activity {
@BindView(R.id.vp_preview_picture)
ViewPager mViewPager;
//当前的位置
public class PreviewActivty extends DataBindingActivity<ActivtyPreviewBinding> {
private MyPageAdapter adapter;
private Context mContext;
public ArrayList<String> mInfos = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activty_delete);
ButterKnife.bind(this);
public int getLayoutId() {
return R.layout.activty_preview;
}
@Override
public void initView() {
mContext = this;
mInfos = getIntent().getStringArrayListExtra(Constants.BUNDLE_KEY_ID);
adapter = new MyPageAdapter(mInfos);
mViewPager.setAdapter(adapter);
mViewPager.setCurrentItem(getIntent().getIntExtra(Constants.BUNDLE_KEY_ID, 0));
mBind.vpPreview.setAdapter(adapter);
mBind.vpPreview.setCurrentItem(getIntent().getIntExtra(Constants.BUNDLE_KEY_ID, 0));
mBind.titileBack.setOnClickListener(o -> finish());
}
class MyPageAdapter extends PagerAdapter {
......@@ -79,15 +74,5 @@ public class PreviewActivty extends Activity {
return view == object;
}
}
@OnClick({R.id.back_order_finish})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.back_order_finish:
finish();
break;
}
}
}
......@@ -6,29 +6,24 @@ import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.bean.OrderDetail;
import com.dayu.bigfish.bean.event.OrderState;
import com.dayu.bigfish.bean.event.RefreshTab;
import com.dayu.bigfish.bean.sqlbean.OrderInfo;
import com.dayu.bigfish.databinding.ActivityProcessOrderBinding;
import com.dayu.bigfish.greendao.GreenDaoManager;
import com.dayu.bigfish.greendao.OrderInfoDao;
import com.dayu.bigfish.presenter.processorder.ProcessOrderContract;
import com.dayu.bigfish.presenter.processorder.ProcessOrderPresenter;
import com.dayu.bigfish.ui.views.SwitchImage;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.GlideImageLoader;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.SPUtils;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.utils.UtilsScreen;
import com.luck.picture.lib.PictureSelectionModel;
......@@ -45,127 +40,27 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.OnClick;
import static com.dayu.bigfish.R.id.et_input;
import static com.dayu.bigfish.R.id.et_up_input;
import static com.dayu.bigfish.R.id.image_switch;
import static com.dayu.bigfish.R.id.text_six_value;
import static com.dayu.bigfish.ui.fragment.HomeOrderFragment.ORDER_FINISH;
import static com.dayu.bigfish.ui.fragment.HomeOrderFragment.ORDER_NOCONTACT_FINISH;
import static com.dayu.bigfish.utils.SPUtils.get;
/**
* 工程师提交验收报告,包含上传照片
* on 2017/9/15.
* Created by yu
*/
public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter> implements ProcessOrderContract.View {
public class ProcessOrderActivity extends BaseBingdActivity<ProcessOrderPresenter, ActivityProcessOrderBinding>
implements ProcessOrderContract.View {
@BindView(R.id.back_order_finish)
ImageView backOrderFinish;
@BindView(R.id.title_finish)
RelativeLayout titleFinish;
@BindView(R.id.text_one_text)
TextView textOneText;
@BindView(R.id.text_one_value)
TextView textOneValue;
@BindView(R.id.text_one)
RelativeLayout textOne;
@BindView(R.id.image_lin)
ImageView imageLin;
@BindView(R.id.text_two_text)
TextView textTwoText;
@BindView(R.id.text_two_value)
TextView textTwoValue;
@BindView(R.id.text_two)
RelativeLayout textTwo;
@BindView(R.id.image_two_lin)
ImageView imageTwoLin;
@BindView(R.id.text_six_text)
TextView textSixText;
@BindView(text_six_value)
TextView textSixValue;
@BindView(R.id.text_six)
RelativeLayout textSix;
@BindView(R.id.image_six_lin)
ImageView imageSixLin;
@BindView(R.id.time_subscribe_remark)
TextView timeSubscribeRemark;
@BindView(et_input)
EditText etInput;
@BindView(R.id.time_Three)
RelativeLayout timeThree;
@BindView(R.id.image_seven_lin)
ImageView imageSevenLin;
@BindView(R.id.photo_text_title)
TextView photoTextTitle;
@BindView(R.id.photo_view)
RelativeLayout photoView;
@BindView(R.id.image_eight_lin)
ImageView imageEightLin;
@BindView(R.id.switch_text)
TextView switchText;
@BindView(R.id.switch_view)
RelativeLayout switchView;
@BindView(R.id.image_nine_lin)
ImageView imageNineLin;
@BindView(R.id.edit_door_value)
EditText editDoorValue;
@BindView(R.id.up_door)
RelativeLayout upDoor;
@BindView(R.id.image_two_one_lin)
ImageView imageTwoOneLin;
@BindView(R.id.edit_serve_value)
EditText editServeValue;
@BindView(R.id.up_serve)
RelativeLayout upServe;
@BindView(R.id.image_two_two_lin)
ImageView imageTwoTwoLin;
@BindView(R.id.edit_materials_value)
EditText editMaterialsValue;
@BindView(R.id.up_materials)
RelativeLayout upMaterials;
@BindView(R.id.image_two_three_lin)
ImageView imageTwoThreeLin;
@BindView(R.id.edit_other_value)
EditText editOtherValue;
@BindView(R.id.up_other)
RelativeLayout upOther;
@BindView(R.id.image_two_four_lin)
ImageView imageTwoFourLin;
@BindView(et_up_input)
EditText etUpInput;
@BindView(R.id.save)
Button save;
@BindView(R.id.submit)
Button submit;
@BindView(R.id.text_content_one)
RelativeLayout textContentOne;
@BindView(R.id.play_view)
RelativeLayout playView;
@BindView(R.id.image_switch)
SwitchImage imageSwitch;
@BindView(R.id.ll_image)
LinearLayout mLImage;
@BindView(R.id.tv_modify_sop)
TextView mSopTipTv;
@BindView(R.id.tv_total_money)
TextView mTotalMoney;
private int orderId;
private int engineerId;
private String brandName; //品牌名称
private String serveName; //服务类型
private int isPay = 1;//是否支付费用,默认=1 不支付费用
private String serveValue1;
private String serveValue2;
private String upDoorCost;
private String serveCost;
private String cailiaoCost;
private String otherCost;
private String payRemark;
private Boolean isSwitch;
private String mDoorPrice;
private String mServePrice;
private String mMeterailPrice;
private String mOtherPrice;
private String mServeInfo;
private String categoryName; //产品名称
private int finshPosition;
private int mIvWeight;
......@@ -175,10 +70,11 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter> im
private ArrayList<String> mImages = new ArrayList<>();
private OrderInfoDao mOrderInfoDao;
private int mAnyContacts;
private String mDoorInfo;
@Override
public int getLayoutId() {
return R.layout.activity_order_finish;
return R.layout.activity_process_order;
}
......@@ -191,17 +87,18 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter> im
mAddIV.setLayoutParams(new ViewGroup.LayoutParams(mIvWeight, mIvWeight));
mAddIV.setImageResource(R.mipmap.settopic_pictrue);
mAddIV.setOnClickListener(v -> choosePic());
isSwitch = (boolean) get(this, "big_fish", "imageSwitch", false);
if (isSwitch) {
imageSwitch.setSwitchButton(isSwitch);
playView.setVisibility(View.VISIBLE);
isPay = 2; //支付费用
} else {
imageSwitch.setSwitchButton(isSwitch);
playView.setVisibility(View.GONE);
isPay = 1;//不支付费用
}
// isSwitch = (boolean) get(this, "big_fish", "imageSwitch", false);
// if (isSwitch) {
// mBind.ivSwitch.setSwitchButton(isSwitch);
// mBind.rlPay.setVisibility(View.VISIBLE);
// isPay = 2; //支付费用
// } else {
// mBind.ivSwitch.setSwitchButton(isSwitch);
// mBind.rlPay.setVisibility(View.GONE);
// isPay = 1;//不支付费用
// }
initData();
initListener();
ProgressUtil.startLoad(mActivity);
mPresenter.getOrderInfo(orderId);
}
......@@ -217,51 +114,98 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter> im
List<OrderInfo> list = query.list();
if (list.size() > 0) {
OrderInfo info = list.get(0);
serveValue2 = info.getServerRecord();
upDoorCost = info.getDoorPrice();
serveCost = info.getServerPrice();
cailiaoCost = info.getMaterialCost();
otherCost = info.getOtherPrice();
payRemark = info.getOtherInfo();
mServeInfo = info.getServerRecord();
mDoorPrice = info.getDoorPrice();
mServePrice = info.getServerPrice();
mMeterailPrice = info.getMaterialCost();
mOtherPrice = info.getOtherPrice();
mDoorInfo = info.getOtherInfo();
if (info.getImgPath() != null && info.getImgPath().size() > 0
&& !TextUtils.isEmpty(info.getImgPath().get(0))) {
mImages.addAll(info.getImgPath());
}
}
etInput.setText(serveValue2);
editDoorValue.setText(upDoorCost);
editServeValue.setText(serveCost);
editMaterialsValue.setText(cailiaoCost);
editOtherValue.setText(otherCost);
etUpInput.setText(payRemark);
mBind.etServeInfo.setText(mServeInfo);
mBind.etDoorPrice.setText(mDoorPrice);
mBind.etServePrice.setText(mServePrice);
mBind.etMaterialsPrice.setText(mMeterailPrice);
mBind.etOtherPrice.setText(mOtherPrice);
mBind.etDoorInfo.setText(mDoorInfo);
isShowSwtichButton();
initPhotoView();
}
private void isShowSwtichButton() {
if (!TextUtils.isEmpty(mDoorPrice) || !TextUtils.isEmpty(mDoorPrice) || !TextUtils.isEmpty(mDoorPrice)
|| !TextUtils.isEmpty(mDoorPrice) || !TextUtils.isEmpty(mDoorPrice)) {
mBind.ivSwitch.setSwitchButton(true);
mBind.rlPay.setVisibility(View.VISIBLE);
isPay = 2;
} else {
mBind.ivSwitch.setSwitchButton(false);
mBind.rlPay.setVisibility(View.GONE);
isPay = 1;
}
}
private void initListener() {
mBind.tvBack.setOnClickListener(o -> finish());
mBind.save.setOnClickListener(o -> saveOrder());
mBind.ivSwitch.setOnClickListener(o -> switchButton());
mBind.submit.setOnClickListener(o -> submitOrder());
mBind.tvModifySop.setOnClickListener(o -> dumpSOPActivity(orderId, finshPosition));
}
private void submitOrder() {
if (mImages.size() != 0) {
ProgressUtil.startLoad(mActivity);
mPresenter.commitPhoto(mImages);
} else {
getData();
ProgressUtil.startLoad(mActivity);
mPresenter.commitOrder(null, orderId, mServeInfo,
engineerId, isPay, mDoorPrice, mDoorInfo,
mServePrice, mMeterailPrice, mOtherPrice);
}
}
@OnClick({R.id.back_order_finish, image_switch, R.id.save, R.id.submit, R.id.tv_modify_sop})
public void onViewClicked(View view) {
switch (view.getId()) {
//保存并退出
case R.id.save:
private void switchButton() {
mBind.ivSwitch.changeSwitchButton();
if (mBind.ivSwitch.getSwitchButton()) {
mBind.rlPay.setVisibility(View.VISIBLE);
isPay = 2;
} else {
mBind.etServeInfo.setText("");
mBind.etDoorPrice.setText("");
mBind.etServePrice.setText("");
mBind.etMaterialsPrice.setText("");
mBind.etOtherPrice.setText("");
mBind.etDoorInfo.setText("");
mBind.rlPay.setVisibility(View.GONE);
isPay = 1;
}
}
private void saveOrder() {
OrderInfo orderBean = new OrderInfo();
getData();
if (!TextUtils.isEmpty(serveValue1)) {
orderBean.setServerRecord(serveValue1);
if (!TextUtils.isEmpty(mServeInfo)) {
orderBean.setServerRecord(mServeInfo);
}
if (!TextUtils.isEmpty(upDoorCost)) {
orderBean.setDoorPrice(upDoorCost);
if (!TextUtils.isEmpty(mDoorPrice)) {
orderBean.setDoorPrice(mDoorPrice);
}
if (!TextUtils.isEmpty(serveCost)) {
orderBean.setServerPrice(serveCost);
if (!TextUtils.isEmpty(mServePrice)) {
orderBean.setServerPrice(mServePrice);
}
if (!TextUtils.isEmpty(cailiaoCost)) {
orderBean.setMaterialCost(cailiaoCost);
if (!TextUtils.isEmpty(mMeterailPrice)) {
orderBean.setMaterialCost(mMeterailPrice);
}
if (!TextUtils.isEmpty(otherCost)) {
orderBean.setOtherPrice(otherCost);
if (!TextUtils.isEmpty(mOtherPrice)) {
orderBean.setOtherPrice(mOtherPrice);
}
if (!TextUtils.isEmpty(payRemark)) {
orderBean.setOtherInfo(payRemark);
if (!TextUtils.isEmpty(mDoorInfo)) {
orderBean.setOtherInfo(mDoorInfo);
}
orderBean.setId(orderId);
orderBean.setEngineerId(engineerId);
......@@ -269,45 +213,8 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter> im
orderBean.setImgPath(mImages);
}
mOrderInfoDao.insertOrReplace(orderBean);
//退出
case R.id.back_order_finish:
SPUtils.put(this, "imageSwitch", imageSwitch.getSwitchButton());
ToastUtils.showShortToast(getString(R.string.order_save_success));
finish();
break;
case R.id.image_switch:
imageSwitch.changeSwitchButton();
if (imageSwitch.getSwitchButton()) {
playView.setVisibility(View.VISIBLE);
isPay = 2;
} else {
etInput.setText("");
editDoorValue.setText("");
editServeValue.setText("");
editMaterialsValue.setText("");
editOtherValue.setText("");
etUpInput.setText("");
playView.setVisibility(View.GONE);
isPay = 1;
}
break;
case R.id.submit:
if (mImages.size() != 0) {
ProgressUtil.startLoad(mActivity);
mPresenter.commitPhoto(mImages);
} else {
getData();
ProgressUtil.startLoad(mActivity);
mPresenter.commitOrder(null, orderId, serveValue1,
engineerId, isPay, upDoorCost, payRemark,
serveCost, cailiaoCost, otherCost);
}
break;
case R.id.tv_modify_sop:
dumpSOPActivity(orderId, finshPosition);
break;
default:
break;
}
}
private void dumpSOPActivity(int id, int adapterPosition) {
......@@ -318,12 +225,12 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter> im
}
private void getData() {
serveValue1 = etInput.getText().toString();
upDoorCost = editDoorValue.getText().toString();
serveCost = editServeValue.getText().toString();
cailiaoCost = editMaterialsValue.getText().toString();
otherCost = editOtherValue.getText().toString();
payRemark = etUpInput.getText().toString();
mServeInfo = mBind.etServeInfo.getText().toString();
mDoorPrice = mBind.etDoorPrice.getText().toString();
mServePrice = mBind.etServePrice.getText().toString();
mMeterailPrice = mBind.etMaterialsPrice.getText().toString();
mOtherPrice = mBind.etOtherPrice.getText().toString();
mDoorInfo = mBind.etDoorInfo.getText().toString();
}
private void dumpPic() {
......@@ -337,7 +244,7 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter> im
* 图片列表显示.
*/
private void initPhotoView() {
mLImage.removeAllViews();
mBind.llImage.removeAllViews();
for (int i = 0; i < mImages.size(); i++) {
View view = LayoutInflater.from(mActivity).inflate(R.layout.item_picture_select, null);
view.setLayoutParams(new RelativeLayout.LayoutParams(mIvWeight, mIvWeight));
......@@ -349,15 +256,15 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter> im
imageView.setOnClickListener(v -> dumpPic());
ivDelete.setOnClickListener(v -> {
if (mImages.size() == 5) {
mLImage.addView(mAddIV);
mBind.llImage.addView(mAddIV);
}
mLImage.removeView(view);
mBind.llImage.removeView(view);
mImages.remove(path);
});
mLImage.addView(view);
mBind.llImage.addView(view);
}
if (mImages.size() < 5) {
mLImage.addView(mAddIV);
mBind.llImage.addView(mAddIV);
}
}
......@@ -418,22 +325,22 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter> im
serveName = detail.getProviderName();
categoryName = detail.getCategoryName();
mAnyContacts = detail.getAnyContacts();
textOneValue.setText(categoryName);
textTwoValue.setText(brandName);
textSixValue.setText(serveName);
mBind.tvProduct.setText(categoryName);
mBind.tvBrand.setText(brandName);
mBind.tvServe.setText(serveName);
if (detail.getSubStatus() == 5) {
mSopTipTv.setVisibility(View.VISIBLE);
mBind.tvModifySop.setVisibility(View.VISIBLE);
} else {
mSopTipTv.setVisibility(View.GONE);
mBind.tvModifySop.setVisibility(View.GONE);
}
}
@Override
public void commitPhotoSuccess(List<String> list) {
getData();
mPresenter.commitOrder(list, orderId, serveValue1,
engineerId, isPay, upDoorCost, payRemark,
serveCost, cailiaoCost, otherCost);
mPresenter.commitOrder(list, orderId, mServeInfo,
engineerId, isPay, mDoorPrice, mDoorInfo,
mServePrice, mMeterailPrice, mOtherPrice);
mImages.clear();
PictureFileUtils.deleteCacheDirFile(mActivity);
}
......
......@@ -3,19 +3,18 @@ package com.dayu.bigfish.ui;
import android.content.Intent;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.Order;
import com.dayu.bigfish.bean.event.RefreshApoiment;
import com.dayu.bigfish.bean.event.RefreshReceivingNum;
import com.dayu.bigfish.bean.event.RefreshTab;
import com.dayu.bigfish.bean.event.SwtichFragment;
import com.dayu.bigfish.databinding.ActivityReceivingBinding;
import com.dayu.bigfish.presenter.receivingorder.ReceivingContract;
import com.dayu.bigfish.presenter.receivingorder.ReceivingPresenter;
import com.dayu.bigfish.ui.adapter.OrderDoingAdapter;
......@@ -27,9 +26,6 @@ import org.greenrobot.eventbus.EventBus;
import java.util.List;
import butterknife.BindView;
import butterknife.OnClick;
/**
* 待接单列表
......@@ -37,14 +33,8 @@ import butterknife.OnClick;
* Created by yu
*/
public class ReceivingActivity extends BaseActivity<ReceivingPresenter> implements ReceivingContract.View, SwipeRefreshLayout.OnRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
public List<Order> list;
@BindView(R.id.receiving_refersh)
SwipeRefreshLayout mRefreshLayout;
@BindView(R.id.receiving_listview)
RecyclerView mRecyclerView;
@BindView(R.id.order_title_num)
TextView mTitle;
public class ReceivingActivity extends BaseBingdActivity<ReceivingPresenter, ActivityReceivingBinding> implements
ReceivingContract.View, SwipeRefreshLayout.OnRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
private int userId;
private int siteId;
private int mPage = 1;
......@@ -53,24 +43,25 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter> implemen
private OrderDoingAdapter mAdapter;
private int mRefreshState = 1; //1:刷新,2:下拉加载
private int mTotalRows;
public List<Order> list;
@Override
public int getLayoutId() {
return R.layout.activity_recycleview;
return R.layout.activity_receiving;
}
@Override
public void initView() {
userId = GetUserInfo.getACCOUNT_ID(this);
siteId = GetUserInfo.getSITE_ID(this);
mTitle.setText(getString(R.string.receive_list));
mBind.tvTitle.setText(getString(R.string.receive_list));
mAdapter = new OrderDoingAdapter(R.layout.fragment_orderdoing_item, mActivity);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setAdapter(mAdapter);
mAdapter.disableLoadMoreIfNotFullPage(mRecyclerView);
mRefreshLayout.setOnRefreshListener(this);
mAdapter.setOnLoadMoreListener(this, mRecyclerView);
mBind.recyclerView.setLayoutManager(new LinearLayoutManager(this));
mBind.recyclerView.setAdapter(mAdapter);
mAdapter.disableLoadMoreIfNotFullPage(mBind.recyclerView);
mBind.swipeRefersh.setOnRefreshListener(this);
mAdapter.setOnLoadMoreListener(this, mBind.recyclerView);
mAdapter.setEnableLoadMore(false);
ProgressUtil.startLoad(mActivity);
mPresenter.getReceiveOrder(Constants.WATING_ORDER, userId, siteId, mPage, mPageSize);
......@@ -90,11 +81,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter> implemen
intent.putExtra("orderId", order.getId());
startActivity(intent);
});
}
@OnClick(R.id.receiving_back)
public void onViewClicked() {
finish();
mBind.receivingBack.setOnClickListener(o -> finish());
}
......@@ -104,7 +91,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter> implemen
mPageSize = orders.getPageSize();
mTotalRows = orders.getTotalRows();
if (mRefreshState == 1) {
mRefreshLayout.setRefreshing(false);
mBind.swipeRefersh.setRefreshing(false);
mAdapter.setNewData(orders.getData());
mAdapter.loadMoreEnd();
mAdapter.setEnableLoadMore(true);
......@@ -126,7 +113,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter> implemen
@Override
public void getReceiveOrderFail() {
mRefreshLayout.setRefreshing(false);
mBind.swipeRefersh.setRefreshing(false);
mAdapter.setEnableLoadMore(true);
mAdapter.setEmptyView(R.layout.tips_loading_failed);
mAdapter.loadMoreFail();
......
package com.dayu.bigfish.ui;
import android.app.Dialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import android.provider.Settings;
import android.view.View;
import android.widget.TextView;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.databinding.ActivitySettingBinding;
import com.dayu.bigfish.presenter.setting.SettingContract;
import com.dayu.bigfish.presenter.setting.SettingPresenter;
import com.dayu.bigfish.ui.views.CustomDialog;
import com.dayu.bigfish.ui.views.SwitchImage;
import com.dayu.bigfish.utils.AppUtils;
import com.dayu.bigfish.utils.DataCleanManager;
import com.dayu.bigfish.utils.ProgressUtil;
......@@ -21,11 +18,8 @@ import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.utils.managers.UserManager;
import com.hyphenate.chat.EMClient;
import java.io.File;
import java.util.concurrent.TimeUnit;
import butterknife.BindView;
import butterknife.OnClick;
import io.reactivex.Observable;
/**
......@@ -33,12 +27,7 @@ import io.reactivex.Observable;
* 2017/9/2.
*/
public class SettingActivity extends BaseActivity<SettingPresenter> implements SettingContract.View {
@BindView(R.id.set_message_switch)
SwitchImage setMessageSwitch;
@BindView(R.id.tv_hc)
TextView tvHc;
public class SettingActivity extends BaseBingdActivity<SettingPresenter, ActivitySettingBinding> implements SettingContract.View {
@Override
public int getLayoutId() {
return R.layout.activity_setting;
......@@ -47,36 +36,42 @@ public class SettingActivity extends BaseActivity<SettingPresenter> implements S
@Override
public void initView() {
try {
tvHc.setText(DataCleanManager.getCacheSize(new File(Environment.getExternalStorageDirectory() + "/Android/data/com.dayu.bigfish/cache")));
} catch (Exception e) {
e.printStackTrace();
}
mBind.exitButton.setOnClickListener(o -> {
UserManager.getInstance().clearUserInfo(this);
EMClient.getInstance().logout(true);
Intent Intents = new Intent(this, LoginActivity.class);
Intents.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(Intents);
});
mBind.titleBack.setOnClickListener(o -> finish());
mBind.setMessageSwitch.setOnClickListener(o -> mBind.setMessageSwitch.changeSwitchButton());
mBind.setMessage.setOnClickListener(o -> {
startActivity(new Intent(Settings.ACTION_APPLICATION_SETTINGS));
mBind.setMessageSwitch.changeSwitchButton();
});
mBind.setClearHuancun.setOnClickListener(o -> clearCach());
mBind.setJianceGengxin.setOnClickListener(o -> {
ProgressUtil.startLoad(mActivity);
mPresenter.updataVersion();
});
mBind.setKefuPhone.setOnClickListener(o -> {
Intent intent1 = new Intent(Intent.ACTION_DIAL);
intent1.setData(Uri.parse("tel:400-0086-898"));
startActivity(intent1);
});
mBind.setGuanyuWe.setOnClickListener(o -> {
Intent intentAbout = new Intent(this, AboutUs.class);
startActivity(intentAbout);
});
mBind.setCenterFankui.setOnClickListener(o -> {
Intent intentIdeaActivity = new Intent(this, FeedBackActivity.class);
startActivity(intentIdeaActivity);
});
}
@OnClick({R.id.set_back, R.id.set_message_switch, R.id.set_message, R.id.set_clear_huancun, R.id.set_jiance_gengxin, R.id.set_kefu_phone, R.id.set_guanyu_we, R.id.set_center_fankui, R.id.exit_button})
public void onViewClicked(View view) {
switch (view.getId()) {
//返回到Home界面
case R.id.set_back:
finish();
break;
//接单通知的开关
case R.id.set_message_switch:
setMessageSwitch.changeSwitchButton();
break;
case R.id.set_message:
startActivity(new Intent(Settings.ACTION_APPLICATION_SETTINGS));
setMessageSwitch.changeSwitchButton();
break;
//清空缓存
case R.id.set_clear_huancun:
private void clearCach() {
CustomDialog dialog = new CustomDialog(mActivity, R.style.custom_dialog2, getString(R.string.sure_clear_data)
, new CustomDialog.OnCloseListener() {
@Override
public void onClick(Dialog dialog, boolean confirm) {
, (dialog1, confirm) -> {
if (confirm) {
ProgressUtil.startLoad(mActivity, getString(R.string.on_clear));
Observable.timer(2, TimeUnit.SECONDS).subscribe(
......@@ -85,56 +80,14 @@ public class SettingActivity extends BaseActivity<SettingPresenter> implements S
ToastUtils.showShortToast(getString(R.string.clear_success));
});
DataCleanManager.deleteFolderFile(Environment.getExternalStorageDirectory() + "/Android/data/com.dayu.bigfish/cache", false);
try {
tvHc.setText(DataCleanManager.getCacheSize(new File(Environment.getExternalStorageDirectory() + "/Android/data/com.dayu.bigfish/cache")));
} catch (Exception e) {
e.printStackTrace();
}
} else {
}
dialog.dismiss();
}
dialog1.dismiss();
});
dialog.setTitle(getString(R.string.notice))
.setNegativeButton(getString(R.string.cancle))
.setPositiveButton(getString(R.string.comfirm));
dialog.show();
break;
//更新
case R.id.set_jiance_gengxin:
ProgressUtil.startLoad(mActivity);
mPresenter.updataVersion();
break;
//客服电话
case R.id.set_kefu_phone:
Intent intent1 = new Intent(Intent.ACTION_DIAL);
//4000086898
intent1.setData(Uri.parse("tel:400-0086-898"));
startActivity(intent1);
break;
//关于我们
case R.id.set_guanyu_we:
Intent intentAbout = new Intent(this, AboutUs.class);
startActivity(intentAbout);
break;
//意见反馈
case R.id.set_center_fankui:
Intent intentIdeaActivity = new Intent(this, FeedBackActivity.class);
startActivity(intentIdeaActivity);
break;
//退出账号
case R.id.exit_button:
//清除保存在sp和代码中的账户信息
UserManager.getInstance().clearUserInfo(this);
EMClient.getInstance().logout(true);
//打开登录页面
Intent Intents = new Intent(this, LoginActivity.class);
Intents.setFlags(
Intent.FLAG_ACTIVITY_CLEAR_TASK |
Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(Intents);
break;
}
}
@Override
......
......@@ -3,19 +3,19 @@ package com.dayu.bigfish.ui;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.DataBindingActivity;
import com.dayu.bigfish.bean.event.OrderState;
import com.dayu.bigfish.databinding.ActivityWebviewBinding;
import com.dayu.bigfish.utils.GetUserInfo;
import com.github.lzyzsd.jsbridge.BridgeHandler;
import com.github.lzyzsd.jsbridge.BridgeWebView;
......@@ -25,8 +25,7 @@ import org.greenrobot.eventbus.EventBus;
import org.json.JSONException;
import org.json.JSONObject;
import butterknife.BindView;
import butterknife.ButterKnife;
import java.io.File;
import static com.dayu.bigfish.ui.fragment.HomeOrderFragment.ORDER_SOP_FINISH;
......@@ -34,11 +33,7 @@ import static com.dayu.bigfish.ui.fragment.HomeOrderFragment.ORDER_SOP_FINISH;
* Created by luofan on 2017/11/27.
*/
public class SopWebViewActivity extends AppCompatActivity {
@BindView(R.id.webView)
BridgeWebView mWebView;
@BindView(R.id.receiving_back)
ImageView mBackTitle;
public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBinding> {
private String mToken;
private int mOrderId;
private int mPositon;
......@@ -47,18 +42,24 @@ public class SopWebViewActivity extends AppCompatActivity {
int RESULT_CODE = 0;
int RESULT_CODE_FOR_Lollipop = 1;
private SopWebViewActivity mActivity;
private BridgeWebView mWebView;
@Override
public int getLayoutId() {
return R.layout.activity_webview;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.activity_webview_layout);
ButterKnife.bind(this);
public void initView() {
mActivity = this;
mToken = GetUserInfo.getToken(mActivity);
mOrderId = getIntent().getIntExtra(Constants.ORDER_ID, 0);
mPositon = getIntent().getIntExtra(Constants.ORDER_POSTION, 0);
mBackTitle.setOnClickListener(o -> finish());
mBind.titleBack.setOnClickListener(o -> finish());
mWebView = new BridgeWebView(mActivity);
mWebView.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
mBind.llWeb.addView(mWebView);
initWebView();
}
......@@ -77,9 +78,9 @@ public class SopWebViewActivity extends AppCompatActivity {
settings.setLoadWithOverviewMode(true);//自适应屏幕
settings.setDomStorageEnabled(true);
settings.setSaveFormData(true);
//settings.setSupportMultipleWindows(true);
settings.setAppCacheEnabled(true);
settings.setCacheMode(WebSettings.LOAD_NO_CACHE); //优先使用缓存
settings.setAppCacheEnabled(false);
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
settings.setAppCachePath(getFilesDir().getAbsolutePath() + "/Android/data/com.dayu.bigfish/cache");
settings.setJavaScriptEnabled(true); //启用支持javascript
settings.setJavaScriptCanOpenWindowsAutomatically(true);
......@@ -237,7 +238,7 @@ public class SopWebViewActivity extends AppCompatActivity {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
mWebView.goBack();
clearCach();
return true;
}
return super.onKeyDown(keyCode, event);
......@@ -251,7 +252,50 @@ public class SopWebViewActivity extends AppCompatActivity {
@Override
protected void onDestroy() {
super.onDestroy();
mWebView.stopLoading();
clearCach();
}
public void clearCach() {
try {
deleteDatabase("webview.db");
deleteDatabase("webviewCache.db");
File appCacheDir = new File(getFilesDir().getAbsolutePath() + "/Android/data/com.dayu.bigfish/cache");
File webviewCacheDir = new File(getCacheDir().getAbsolutePath() + "/webviewCache");
if (webviewCacheDir.exists()) {
deleteFile(webviewCacheDir);
}
if (appCacheDir.exists()) {
deleteFile(appCacheDir);
}
} catch (Exception e) {
e.printStackTrace();
}
mWebView.clearHistory();
mWebView.clearFormData();
mWebView.goBack();
mWebView.removeAllViews();
mWebView.destroy();
mBind.llWeb.removeAllViews();
}
/**
* 递归删除 文件/文件夹
*
* @param file
*/
public void deleteFile(File file) {
if (file.exists()) {
if (file.isFile()) {
file.delete();
} else if (file.isDirectory()) {
File files[] = file.listFiles();
for (int i = 0; i < files.length; i++) {
deleteFile(files[i]);
}
}
file.delete();
} else {
}
}
}
......@@ -4,20 +4,18 @@ import android.content.Intent;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.bigkoo.pickerview.TimePickerView;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.bean.event.OrderState;
import com.dayu.bigfish.bean.event.RefreshApoiment;
import com.dayu.bigfish.bean.event.RefreshServe;
import com.dayu.bigfish.bean.event.RefreshTab;
import com.dayu.bigfish.databinding.ActivitySubscribeTimeBinding;
import com.dayu.bigfish.presenter.subcribeTime.SubcribeContract;
import com.dayu.bigfish.presenter.subcribeTime.SubcribeTimePresenter;
import com.dayu.bigfish.utils.DateUtils;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.utils.UtilsDate;
......@@ -29,10 +27,6 @@ import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;
import butterknife.BindView;
import butterknife.OnClick;
import static com.dayu.bigfish.R.id.title_text;
import static com.dayu.bigfish.ui.fragment.HomeOrderFragment.ORDER_DOING;
import static com.dayu.bigfish.ui.fragment.HomeOrderFragment.ORDER_YUYUE;
import static com.dayu.bigfish.ui.fragment.HomeOrderFragment.SUBCRIBE_TIME;
......@@ -45,18 +39,10 @@ import static com.dayu.bigfish.utils.UtilsDate.LONG_TIME_FORMAT_TWO;
* on 2017/9/12.
*/
public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter> implements SubcribeContract.View {
@BindView(title_text)
TextView titleText;
@BindView(R.id.et_input)
EditText mInfoEt;
@BindView(R.id.text_date_value)
TextView mDayTv;
@BindView(R.id.text_time_value)
TextView mTimeTv;
public class SubcribeTimeActivity extends BaseBingdActivity<SubcribeTimePresenter, ActivitySubscribeTimeBinding>
implements SubcribeContract.View {
private int orderId;
private String mInfo;
private DateUtils dateUtils = new DateUtils();
private int finshPosition;
private boolean mIsToday;
private int mState;
......@@ -65,7 +51,7 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter> im
@Override
public int getLayoutId() {
return R.layout.activity_updata_subscribe_time;
return R.layout.activity_subscribe_time;
}
......@@ -76,12 +62,26 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter> im
finshPosition = intent.getIntExtra(Constants.ORDER_POSTION, 0);
mState = intent.getIntExtra(Constants.ORDER_STATE, 0);
if (mState == 2) {
titleText.setText(getString(R.string.tv_home_tab_one_subscribe_time));
mBind.tvTile.setText(getString(R.string.tv_home_tab_one_subscribe_time));
} else if (mState == 3) {
titleText.setText(getString(R.string.tv_home_tab_updata_subscribe_time));
mBind.tvTile.setText(getString(R.string.tv_home_tab_updata_subscribe_time));
} else if (mState == 4) {
titleText.setText(getString(R.string.item_restart));
mBind.tvTile.setText(getString(R.string.item_restart));
}
initListener();
}
private void initListener() {
mBind.ivBack.setOnClickListener(o -> finish());
mBind.btnSubmit.setOnClickListener(o -> comfirmData());
mBind.rlDay.setOnClickListener(o -> selectDay());
mBind.rlTime.setOnClickListener(o -> {
if (TextUtils.isEmpty(mBind.tvDay.getText().toString())) {
ToastUtils.showShortToast(getString(R.string.input_day_first));
return;
}
selectTime();
});
}
@Override
......@@ -98,29 +98,6 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter> im
}
}
@OnClick({R.id.submit_button, R.id.receiving_back, R.id.time_one, R.id.time_two})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.submit_button:
comfirmData();
break;
case R.id.receiving_back:
finish();
break;
case R.id.time_one:
selectDay();
break;
case R.id.time_two:
if (TextUtils.isEmpty(mDayTv.getText().toString())) {
ToastUtils.showShortToast(getString(R.string.input_day_first));
return;
}
selectTime();
break;
}
}
private void selectTime() {
TimePickerView pvTime2 = new TimePickerView.Builder(SubcribeTimeActivity.this, new TimePickerView.OnTimeSelectListener() {
@Override
......@@ -132,7 +109,7 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter> im
return;
} else {
ToastUtils.showShortToast(time);
mTimeTv.setText(time);
mBind.tvTime.setText(time);
}
}
})
......@@ -161,7 +138,7 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter> im
public void onTimeSelect(Date date2, View v) {//选中事件回调
String time = UtilsDate.getTime(date2);
if (UtilsDate.dayDiff(UtilsDate.getNowDate(), date2) >= 0) {
mDayTv.setText(time);
mBind.tvDay.setText(time);
} else {
ToastUtils.showShortToast(getString(R.string.input_right_time));
return;
......@@ -196,9 +173,9 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter> im
}
private void comfirmData() {
mInfo = mInfoEt.getText().toString();
String time = mTimeTv.getText().toString().trim();
String day = mDayTv.getText().toString().trim();
mInfo = mBind.etInfo.getText().toString();
String time = mBind.tvTime.getText().toString().trim();
String day = mBind.tvDay.getText().toString().trim();
if (UtilsUserAccountMatcher.containsEmoji(mInfo)) {
ToastUtils.showShortToast(getString(R.string.no_emoij));
return;
......
package com.dayu.bigfish.ui;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.DataBindingActivity;
import com.dayu.bigfish.bean.NewMessage;
import com.dayu.bigfish.databinding.ActivityMessageDetailBinding;
import com.dayu.bigfish.utils.UtilsDate;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
......@@ -19,10 +17,6 @@ import com.google.gson.reflect.TypeToken;
import java.text.ParseException;
import java.util.Map;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
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;
......@@ -31,54 +25,46 @@ import static com.dayu.bigfish.utils.UtilsDate.SHORT_DATE_FORMAT;
* Created by luofan on 2017/11/27.
*/
public class SystemMesDetailActivity extends AppCompatActivity {
@BindView(R.id.tv_message_title)
TextView mTitleTv;
@BindView(R.id.tv_message_time)
TextView mTimeTv;
@BindView(R.id.tv_message_content)
TextView mContentTv;
@BindView(R.id.tv_message_check)
TextView mCheck;
@BindView(R.id.tv_title)
TextView mTitle;
public class SystemMesDetailActivity extends DataBindingActivity<ActivityMessageDetailBinding> {
private NewMessage message;
private Activity mActivity;
private int mState;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.activity_message_detail_layout);
ButterKnife.bind(this);
message = (NewMessage) getIntent().getSerializableExtra(Constants.HX_MESSAGE);
mState = getIntent().getIntExtra("state", 0);
mActivity = this;
initView();
public int getLayoutId() {
return R.layout.activity_message_detail;
}
private void initView() {
mTitle.setText(getString(R.string.message_dayu_detail));
@Override
public void initView() {
mBind.tvTitle.setText(getString(R.string.message_dayu_detail));
message = (NewMessage) getIntent().getSerializableExtra(Constants.HX_MESSAGE);
mState = getIntent().getIntExtra("state", 0);
String time = null;
try {
String dateMD = UtilsDate.changeFormat(message.getCreateTime(), FORMAT_ONE, SHORT_DATE_FORMAT);
String dateTime = UtilsDate.changeFormat(message.getCreateTime(), FORMAT_ONE, LONG_TIME_FORMAT_TWO);
if (UtilsDate.IsToday(message.getCreateTime())) {
time = getString(R.string.today)+ "\u3000" + dateTime;
time = getString(R.string.today) + "\u3000" + dateTime;
} else {
time = dateMD + "\u3000" + dateTime;
}
} catch (ParseException e) {
e.printStackTrace();
}
mTitleTv.setText(message.getTitle());
mTimeTv.setText(time);
mContentTv.setText("\u3000" + "\u3000" + message.getContent());
mBind.tvMessageTitle.setText(message.getTitle());
mBind.tvMessageTime.setText(time);
mBind.tvMessageContent.setText("\u3000" + "\u3000" + message.getContent());
if (mState == 1) {
mCheck.setVisibility(View.GONE);
mBind.tvMessageCheck.setVisibility(View.GONE);
} else {
mCheck.setVisibility(View.VISIBLE);
mBind.tvMessageCheck.setVisibility(View.VISIBLE);
}
initListener();
}
private void initListener() {
mBind.tvMessageCheck.setOnClickListener(o -> dumpDetail());
mBind.ivBack.setOnClickListener(o -> finish());
}
private void dumpDetail() {
......@@ -88,7 +74,7 @@ public class SystemMesDetailActivity extends AppCompatActivity {
if (!TextUtils.isEmpty(map.get("orderId"))) {
id = Integer.parseInt(map.get("orderId"));
}
intent.putExtra("orderId",id);
intent.putExtra("orderId", id);
startActivity(intent);
}
......@@ -101,17 +87,4 @@ public class SystemMesDetailActivity extends AppCompatActivity {
}
@OnClick({R.id.tv_message_check, R.id.receiving_back})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_message_check:
dumpDetail();
break;
case R.id.receiving_back:
finish();
break;
default:
break;
}
}
}
package com.dayu.bigfish.ui;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.MyApplication;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.base.BaseBingdActivity;
import com.dayu.bigfish.bean.AlipayInfo;
import com.dayu.bigfish.databinding.ActivityWithdrawalsBinding;
import com.dayu.bigfish.presenter.Withdrawals.WithdrawalsContract;
import com.dayu.bigfish.presenter.Withdrawals.WithdrawalsPresenter;
import com.dayu.bigfish.utils.GetUserInfo;
......@@ -21,8 +19,6 @@ import org.json.JSONObject;
import java.util.HashMap;
import butterknife.BindView;
import butterknife.OnClick;
import okhttp3.MediaType;
import okhttp3.RequestBody;
......@@ -31,15 +27,8 @@ import okhttp3.RequestBody;
* Created by luofan on 2017/11/1.
*/
public class WithdrawalsActivity extends BaseActivity<WithdrawalsPresenter> implements WithdrawalsContract.View {
@BindView(R.id.et_withdrawals_accout)
EditText mAccountEt;
@BindView(R.id.et_withdrawals_name)
EditText mNameEt;
@BindView(R.id.et_withdrawals_phone)
EditText mPHoneEt;
@BindView(R.id.tv_account_comfirm)
TextView mComfirmTv;
public class WithdrawalsActivity extends BaseBingdActivity<WithdrawalsPresenter, ActivityWithdrawalsBinding>
implements WithdrawalsContract.View {
private String mAccount;
private String mName;
private String mPhone;
......@@ -48,7 +37,7 @@ public class WithdrawalsActivity extends BaseActivity<WithdrawalsPresenter> impl
@Override
public int getLayoutId() {
return R.layout.activity_withdrawals_layout;
return R.layout.activity_withdrawals;
}
@Override
......@@ -56,16 +45,8 @@ public class WithdrawalsActivity extends BaseActivity<WithdrawalsPresenter> impl
mUserId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
ProgressUtil.startLoad(mActivity);
mPresenter.querAlipay(mUserId);
}
@OnClick({R.id.receiving_back, R.id.tv_account_comfirm})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.receiving_back:
mActivity.finish();
break;
case R.id.tv_account_comfirm:
mBind.ivBack.setOnClickListener(o -> finish());
mBind.tvComfirm.setOnClickListener(o -> {
if (mState == 0) {
ProgressUtil.startLoad(mActivity);
mPresenter.boundAlipay(getInfo());
......@@ -73,16 +54,13 @@ public class WithdrawalsActivity extends BaseActivity<WithdrawalsPresenter> impl
ProgressUtil.startLoad(mActivity);
mPresenter.modifyAlipay(getInfo());
}
break;
default:
break;
}
});
}
public RequestBody getInfo() {
mAccount = mAccountEt.getText().toString().trim();
mName = mNameEt.getText().toString().trim();
mPhone = mPHoneEt.getText().toString().trim();
mAccount = mBind.etAccout.getText().toString().trim();
mName = mBind.etName.getText().toString().trim();
mPhone = mBind.etPhone.getText().toString().trim();
if (TextUtils.isEmpty(mAccount)) {
ToastUtils.showShortToast(getString(R.string.alipay_account_null));
return null;
......@@ -114,19 +92,19 @@ public class WithdrawalsActivity extends BaseActivity<WithdrawalsPresenter> impl
if (info == null) {
mState = 0;
} else {
mAccountEt.setText(info.getAlipayAccount());
mNameEt.setText(info.getAlipayName());
mPHoneEt.setText(info.getAlipayMobile());
mBind.etAccout.setText(info.getAlipayAccount());
mBind.etName.setText(info.getAlipayName());
mBind.etPhone.setText(info.getAlipayMobile());
mState = 1;
}
if (mState == 0) {
mComfirmTv.setBackgroundResource(R.drawable.btn_login_selector);
mComfirmTv.setText(getString(R.string.comfirm));
mComfirmTv.setTextColor(getResources().getColor(R.color.cl_white));
mBind.tvComfirm.setBackgroundResource(R.drawable.btn_login_selector);
mBind.tvComfirm.setText(getString(R.string.comfirm));
mBind.tvComfirm.setTextColor(getResources().getColor(R.color.cl_white));
} else {
mComfirmTv.setBackgroundResource(R.drawable.btn_blue_react);
mComfirmTv.setText(getString(R.string.modify_alipay_info));
mComfirmTv.setTextColor(getResources().getColor(R.color.cl_receiving_order_item_data));
mBind.tvComfirm.setBackgroundResource(R.drawable.btn_blue_react);
mBind.tvComfirm.setText(getString(R.string.modify_alipay_info));
mBind.tvComfirm.setTextColor(getResources().getColor(R.color.cl_receiving_order_item_data));
}
}
......
......@@ -20,6 +20,7 @@ import com.dayu.bigfish.ui.SopWebViewActivity;
import com.dayu.bigfish.ui.SubcribeTimeActivity;
import com.dayu.bigfish.utils.LocationUtils;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.utils.UtilsDate;
import io.reactivex.android.schedulers.AndroidSchedulers;
......@@ -244,6 +245,7 @@ public class OrderDoingAdapter extends BaseQuickAdapter<Order, BaseViewHolder> {
LocationUtils.getCurrentLocation(new LocationUtils.MyLocationListener() {
@Override
public void result(AMapLocation location) {
ToastUtils.showShortToast("获取到定位" + location.getLatitude());
double latitude = 0;
double longitude = 0;
if (location != null) {
......
......@@ -19,8 +19,6 @@ import com.dayu.bigfish.utils.ProgressUtil;
import butterknife.BindView;
import butterknife.OnClick;
import static com.dayu.bigfish.R.id.four_text_nine_text;
/**
* 工单记录的Fragment
* on 2017/9/13.
......@@ -28,40 +26,36 @@ import static com.dayu.bigfish.R.id.four_text_nine_text;
public class OrderDatailsFragment extends BaseFragment<OrderDetailPresenter> implements OrderDetailContract.View {
@BindView(R.id.two_text_two_text)
TextView twoTextTwoText;
@BindView(R.id.two_text_three_text)
TextView twoTextThreeText;
@BindView(R.id.two_text_four_text)
TextView twoTextFourText;
@BindView(R.id.two_text_five_text)
TextView twoTextFiveText;
@BindView(R.id.three_text_two_text)
TextView threeTextTwoText;
@BindView(R.id.three_text_three_text)
TextView threeTextThreeText;
@BindView(R.id.three_text_five_text)
TextView threeTextFiveText;
@BindView(R.id.four_text_one_text)
TextView fourTextOneText;
@BindView(R.id.four_text_two_text)
TextView fourTextTwoText;
@BindView(R.id.four_text_four_text)
TextView fourTextFourText;
@BindView(R.id.four_text_six_text)
TextView fourTextSixText;
@BindView(R.id.four_text_eight_text)
TextView fourTextEightText;
@BindView(four_text_nine_text)
TextView fourTextNineText;
@BindView(R.id.text_one_one)
TextView textOneOne;
@BindView(R.id.text_two_two)
TextView textTwoTwo;
@BindView(R.id.text_three_three)
TextView textThreeThree;
@BindView(R.id.text_foure_foure)
TextView textFoureFoure;
@BindView(R.id.tv_customer_type)
TextView mCustomerType;
@BindView(R.id.tv_customer_name)
TextView mCustomerNameTv;
@BindView(R.id.tv_contact_mode)
TextView mContactModeTv;
@BindView(R.id.tv_customer_address)
TextView mCustomerAddTv;
@BindView(R.id.tv_order_state)
TextView mStateTv;
@BindView(R.id.tv_model)
TextView mModelTv;
@BindView(R.id.tv_total_money)
TextView mTotalMoneyTv;
@BindView(R.id.tv_door_price)
TextView mDoorPriceTv;
@BindView(R.id.tv_serve_price)
TextView mServePriceTv;
@BindView(R.id.tv_material_price)
TextView mMaterialPrice;
@BindView(R.id.tv_other_price)
TextView mOtherPriceTv;
@BindView(R.id.tv_remarks)
TextView mRemarksTv;
@BindView(R.id.tv_order_num)
TextView mOrderNumTv;
@BindView(R.id.tv_product)
TextView mProductTv;
@BindView(R.id.tv_type)
TextView mTypeTv;
@BindView(R.id.is_charge)
RelativeLayout isCharge;
@BindView(R.id.no_charge)
......@@ -78,6 +72,10 @@ public class OrderDatailsFragment extends BaseFragment<OrderDetailPresenter> imp
TextView mSNTv;
@BindView(R.id.tv_serve_name)
TextView mServeName;
@BindView(R.id.tv_brand)
TextView mBrandTv;
@BindView(R.id.tv_warranty_info)
TextView mWarrantyInfoTv;
@BindView(R.id.tv_fujian)
RecyclerView mAccessories;
private int orderId;
......@@ -85,11 +83,11 @@ public class OrderDatailsFragment extends BaseFragment<OrderDetailPresenter> imp
private int customerType;
private int repairType;
private String comment;
private String otherPrice;
private String materialCost;
private String servicePrice;
private String doorPrice;
private String totalPrice;
private Integer otherPrice;
private Integer materialCost;
private Integer servicePrice;
private Integer doorPrice;
private Integer totalPrice;
private boolean mFlag = true;
private AccessoriesAdapter mAdapter;
......@@ -118,66 +116,63 @@ public class OrderDatailsFragment extends BaseFragment<OrderDetailPresenter> imp
}
public void initDataView(OrderDetail dataBean) {
// orderNum 工单编号
textOneOne.setText(dataBean.getOrderNum());
mOrderNumTv.setText(dataBean.getOrderNum());
// status 工单状态 1未接单2未预约3已预约4进行中5已完成6已取消7订单关闭
orderStatu = dataBean.getStatus();
if (orderStatu == 1) {
textTwoTwo.setText(mActivity.getString(R.string.not_receive_order));
mStateTv.setText(mActivity.getString(R.string.not_receive_order));
} else if (orderStatu == 2) {
textTwoTwo.setText(mActivity.getString(R.string.not_appointment_already));
mStateTv.setText(mActivity.getString(R.string.not_appointment_already));
} else if (orderStatu == 3) {
textTwoTwo.setText(mActivity.getString(R.string.appointment_already));
mStateTv.setText(mActivity.getString(R.string.appointment_already));
} else if (orderStatu == 4) {
textTwoTwo.setText(mActivity.getString(R.string.order_doing));
mStateTv.setText(mActivity.getString(R.string.order_doing));
} else if (orderStatu == 5) {
textTwoTwo.setText(mActivity.getString(R.string.finish_order));
mStateTv.setText(mActivity.getString(R.string.finish_order));
} else if (orderStatu == 6) {
textTwoTwo.setText(mActivity.getString(R.string.order_cancle));
mStateTv.setText(mActivity.getString(R.string.cancle_order));
} else if (orderStatu == 7) {
textTwoTwo.setText(mActivity.getString(R.string.order_close));
mStateTv.setText(mActivity.getString(R.string.order_close));
}
//服务商名称
if (!TextUtils.isEmpty(dataBean.getSpuName())) {
mServeName.setText(dataBean.getSpuName());
}
//categoryName 产品名称
textThreeThree.setText(dataBean.getCategoryName());
mProductTv.setText(dataBean.getCategoryName());
//providerName 工单类型
textFoureFoure.setText(dataBean.getProviderName());
mTypeTv.setText(dataBean.getProviderName());
//customerType 客户类型 1个人客户 2企业客户
customerType = dataBean.getCustomerType();
if (customerType == 1) {
twoTextTwoText.setText(mActivity.getString(R.string.personal_customer));
mCustomerType.setText(mActivity.getString(R.string.personal_customer));
} else if (customerType == 2) {
twoTextTwoText.setText(mActivity.getString(R.string.enterprise_customer));
mCustomerType.setText(mActivity.getString(R.string.enterprise_customer));
}
//customerName 客户名称
twoTextThreeText.setText(dataBean.getCustomerName());
mCustomerNameTv.setText(dataBean.getCustomerName());
//customerMobile 客户联系方式
twoTextFourText.setText(dataBean.getCustomerMobile());
mContactModeTv.setText(dataBean.getCustomerMobile());
if (!TextUtils.isEmpty(dataBean.getComment())) {
mInfoDetail.setText(dataBean.getComment());
}
mForwardTimeDetail.setText(dataBean.getAppointmentTime());
mDoorTime.setText(dataBean.getConfirmDoorTime());
twoTextFiveText.setText(dataBean.getProvinceName() + dataBean.getCityName() +
mCustomerAddTv.setText(dataBean.getProvinceName() + dataBean.getCityName() +
dataBean.getDistrictName() + dataBean.getAddress());
if (!TextUtils.isEmpty(dataBean.getBrandName())) {
threeTextTwoText.setText(dataBean.getBrandName());
} else {
threeTextTwoText.setText(mActivity.getString(R.string.no_branch));
mBrandTv.setText(dataBean.getBrandName());
}
if (!TextUtils.isEmpty(dataBean.getProductModel())) {
threeTextThreeText.setText(dataBean.getProductModel());
mModelTv.setText(dataBean.getProductModel());
} else {
threeTextThreeText.setText(mActivity.getString(R.string.no_model));
mModelTv.setText(mActivity.getString(R.string.no_model));
}
repairType = dataBean.getRepairType();
if (repairType == 1) {
threeTextFiveText.setText(mActivity.getString(R.string.honai));
mWarrantyInfoTv.setText(mActivity.getString(R.string.honai));
} else if (repairType == 2) {
threeTextFiveText.setText(mActivity.getString(R.string.warranty));
mWarrantyInfoTv.setText(mActivity.getString(R.string.warranty));
}
if (!TextUtils.isEmpty(dataBean.getSn())) {
mSNTv.setText(dataBean.getSn());
......@@ -186,41 +181,21 @@ public class OrderDatailsFragment extends BaseFragment<OrderDetailPresenter> imp
String isPay = dataBean.getIsPay() + "";
if (!TextUtils.isEmpty(isPay)) {
if (isPay.equals("2") || isPay.equals("2.0")) {
totalPrice = dataBean.getTotalPrice() + "";
if (!TextUtils.isEmpty(totalPrice)) {
fourTextOneText.setText(totalPrice + mActivity.getString(R.string.money));
}
doorPrice = dataBean.getDoorPrice() + "";
if (TextUtils.isEmpty(doorPrice)) {
fourTextTwoText.setText(mActivity.getString(R.string.zero_money));
} else {
fourTextTwoText.setText(doorPrice + mActivity.getString(R.string.money));
}
servicePrice = dataBean.getServicePrice() + "";
if (TextUtils.isEmpty(servicePrice)) {
fourTextFourText.setText(mActivity.getString(R.string.zero_money));
} else {
fourTextFourText.setText(servicePrice + mActivity.getString(R.string.money));
}
materialCost = dataBean.getMaterialCost() + "";
if (TextUtils.isEmpty(materialCost)) {
fourTextSixText.setText(mActivity.getString(R.string.zero_money));
} else {
fourTextSixText.setText(materialCost + mActivity.getString(R.string.money));
}
otherPrice = dataBean.getOtherPrice() + "";
if (TextUtils.isEmpty(otherPrice)) {
fourTextEightText.setText(mActivity.getString(R.string.zero_money));
} else {
fourTextEightText.setText(otherPrice + mActivity.getString(R.string.money));
}
totalPrice = dataBean.getTotalPrice();
mTotalMoneyTv.setText((totalPrice == null ? 0 : totalPrice) + mActivity.getString(R.string.money));
doorPrice = dataBean.getDoorPrice();
mDoorPriceTv.setText((doorPrice == null ? 0 : doorPrice) + mActivity.getString(R.string.money));
servicePrice = dataBean.getServicePrice();
mServePriceTv.setText((servicePrice == null ? 0 : servicePrice) + mActivity.getString(R.string.money));
materialCost = dataBean.getMaterialCost();
mMaterialPrice.setText((materialCost == null ? 0 : materialCost) + mActivity.getString(R.string.money));
otherPrice = dataBean.getOtherPrice();
mOtherPriceTv.setText((otherPrice == null ? 0 : otherPrice) + mActivity.getString(R.string.money));
comment = (String) dataBean.getDoorPriceComment();
if (TextUtils.isEmpty(comment)) {
fourTextNineText.setText(mActivity.getString(R.string.remarks));
mRemarksTv.setText(mActivity.getString(R.string.remarks));
} else {
fourTextNineText.setText(comment);
mRemarksTv.setText(comment);
}
noCharge.setVisibility(View.GONE);
isCharge.setVisibility(View.VISIBLE);
......
......@@ -6,7 +6,6 @@ import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.dayu.bigfish.MyApplication;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseFragment;
import com.dayu.bigfish.bean.ErrorOrder;
......@@ -36,12 +35,14 @@ public class OrderThreeTabFragment extends BaseFragment<ErrorOrderPresenter> imp
@BindView(R.id.recyle_tab_one)
RecyclerView mRecyclerView;
private OrderThreeTabAdapter mAdapter;
private int siteId = GetUserInfo.getSITE_ID(MyApplication.getContext());
private int userId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
private int siteId;
private int userId;
@Override
public View initView(View view) {
siteId = GetUserInfo.getSITE_ID(mActivity);
userId = GetUserInfo.getACCOUNT_ID(mActivity);
mAdapter = new OrderThreeTabAdapter(R.layout.fragment_order_error_item);
mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
mRecyclerView.setAdapter(mAdapter);
......
package com.dayu.bigfish.ui.views;
/**
* Created by 王策玉
* on 2016/11/30.
* 自定义输入框
*/
import android.content.Context;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.text.Editable;
import android.text.InputFilter;
import android.text.Spanned;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.EditText;
import com.dayu.bigfish.R;
/**
* @说明: 自定义带删除按钮的EditText
*/
public class ClearEditText extends EditText implements View.OnFocusChangeListener, TextWatcher {
//EditText右侧的删除按钮
private Drawable mClearDrawable;
private boolean hasFoucs;
public ClearEditText(Context context) {
this(context, null);
}
public ClearEditText(Context context, AttributeSet attrs) {
this(context, attrs, android.R.attr.editTextStyle);
}
public ClearEditText(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
private void init() {
// 获取EditText的DrawableRight,假如没有设置我们就使用默认的图片,获取图片的顺序是左上右下(0,1,2,3,)
mClearDrawable = getCompoundDrawables()[2];
if (mClearDrawable == null) {
mClearDrawable = getResources().getDrawable(R.mipmap.group_2);
}
this.setFilters(new InputFilter[]{getInputFilterForSpace(),new InputFilter.LengthFilter(11)});
mClearDrawable.setBounds(0, 0, mClearDrawable.getIntrinsicWidth(),
mClearDrawable.getIntrinsicHeight());
// 默认设置隐藏图标
setClearIconVisible(false);
// 设置焦点改变的监听
setOnFocusChangeListener(this);
// 设置输入框里面内容发生改变的监听
addTextChangedListener(this);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP) {
if (getCompoundDrawables()[2] != null) {
int x = (int) event.getX();
int y = (int) event.getY();
Rect rect = getCompoundDrawables()[2].getBounds();
int height = rect.height();
int distance = (getHeight() - height) / 2;
boolean isInnerWidth = x > (getWidth() - getTotalPaddingRight()) && x < (getWidth() - getPaddingRight());
boolean isInnerHeight = y > distance && y < (distance + height);
if (isInnerWidth && isInnerHeight) {
this.setText("");
}
}
}
return super.onTouchEvent(event);
}
/**
* 当ClearEditText焦点发生变化的时候,
* 输入长度为零,隐藏删除图标,否则,显示删除图标
*/
@Override
public void onFocusChange(View v, boolean hasFocus) {
this.hasFoucs = hasFocus;
if (hasFocus) {
setClearIconVisible(getText().length() > 0);
} else {
setClearIconVisible(false);
}
}
protected void setClearIconVisible(boolean visible) {
Drawable right = visible ? mClearDrawable : null;
setCompoundDrawables(getCompoundDrawables()[0],
getCompoundDrawables()[1], right, getCompoundDrawables()[3]);
}
@Override
public void onTextChanged(CharSequence s, int start, int count, int after) {
if (hasFoucs) {
setClearIconVisible(s.length() > 0);
}
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
}
@Override
public void afterTextChanged(Editable s) {
}
/**
* 禁止输入空格
*
* @return
*/
public static InputFilter getInputFilterForSpace() {
return new InputFilter() {
@Override
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
//返回null表示接收输入的字符,返回空字符串表示不接受输入的字符
if (source.equals(" "))
return "";
else
return null;
}
};
}
}
......@@ -36,17 +36,10 @@ public class LocationUtils {
mLocationOption.setHttpTimeOut(5000);
// 设置定位参数、、
mlocationClient.setLocationOption(mLocationOption);
// 此方法为每隔固定时间会发起一次定位请求,为了减少电量消耗或网络流量消耗,
// 注意设置合适的定位时间的间隔(最小间隔支持为2000ms),并且在合适时间调用stopLocation()方法来取消定位请求
// 在定位结束后,在合适的生命周期调用onDestroy()方法
// 在单次定位情况下,定位无论成功与否,都无需调用stopLocation()方法移除请求,定位sdk内部会移除
}
/**
* @author frank.fun@qq.com
* @ClassName: MyLocationListener
* @Description: 定位结果回调
* @date 2017年1月8日 下午1:53:11
*/
public interface MyLocationListener {
public void result(AMapLocation location);
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<RelativeLayout
android:id="@+id/title"
style="@style/title">
......@@ -14,7 +17,7 @@
/>
<ImageView
android:id="@+id/about_back"
android:id="@+id/iv_back"
style="@style/title_image_back"
/>
......@@ -92,4 +95,5 @@
</RelativeLayout>
</ScrollView>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -16,7 +18,7 @@
/>
<ImageView
android:id="@+id/receiving_back"
android:id="@+id/title_back"
style="@style/title_image_back"
/>
......@@ -59,11 +61,12 @@
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_balance"
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>
\ No newline at end of file
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -16,7 +18,7 @@
/>
<ImageView
android:id="@+id/receiving_back"
android:id="@+id/title_back"
style="@style/title_image_back"
/>
......@@ -40,4 +42,5 @@
android:text="@string/agreement"
/>
</ScrollView>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cl_home_listview_bg"
......@@ -17,7 +19,7 @@
/>
<ImageView
android:id="@+id/back_image"
android:id="@+id/title_back"
style="@style/title_image_back"
/>
......@@ -32,7 +34,7 @@
>
<EditText
android:id="@+id/text_content"
android:id="@+id/et_content"
android:layout_width="@dimen/dp_327"
android:layout_height="@dimen/dp_163"
android:layout_centerHorizontal="true"
......@@ -60,4 +62,5 @@
android:textColor="@color/cl_white"
android:textSize="@dimen/sp_15"
/>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cl_white"
......@@ -44,8 +46,8 @@
android:layout_weight="1"
>
<com.dayu.bigfish.ui.views.ClearEditText
android:id="@+id/edit_phone"
<EditText
android:id="@+id/et_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......@@ -74,7 +76,7 @@
>
<EditText
android:id="@+id/edit_register"
android:id="@+id/et_code"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerVertical="true"
......@@ -93,8 +95,7 @@
/>
<Button
android:id="@+id/btn_register_send_code"
style="?android:attr/borderlessButtonStyle"
android:id="@+id/btn_send_code"
android:layout_width="97dp"
android:layout_height="35dp"
android:layout_alignParentRight="true"
......@@ -121,7 +122,7 @@
/>
<Button
android:id="@+id/register_button"
android:id="@+id/btn_login"
android:layout_width="@dimen/size_login_button_weidth"
android:layout_height="wrap_content"
android:layout_below="@id/linear"
......@@ -138,7 +139,7 @@
android:id="@+id/ll_agreement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/register_button"
android:layout_below="@id/btn_login"
android:layout_centerInParent="true"
android:layout_marginTop="@dimen/size_login_hint_mt"
android:orientation="horizontal"
......@@ -172,4 +173,5 @@
android:textColor="@color/cl_text"
android:textSize="@dimen/size_login_hint_text"
/>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -103,23 +105,23 @@
android:id="@+id/tab_third"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:drawablePadding="2dp"
android:drawableTop="@drawable/tab_third_selector"
android:gravity="center"
android:text="@string/message"
android:textColor="#585858"
android:layout_centerInParent="true"
android:textSize="10sp"
android:gravity="center"
/>
<ImageView
android:id="@+id/iv_message"
android:layout_width="8.3dp"
android:layout_height="8.3dp"
android:src="@mipmap/renwu_numbg"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="25dp"
android:src="@mipmap/renwu_numbg"
android:visibility="gone"/>
</RelativeLayout>
......@@ -140,4 +142,5 @@
</LinearLayout>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -14,7 +16,7 @@
/>
<ImageView
android:id="@+id/receiving_back"
android:id="@+id/iv_back"
style="@style/title_image_back"
/>
......@@ -72,4 +74,5 @@
android:textColor="@color/cl_white"
android:textSize="14.7sp"
/>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -12,7 +13,7 @@
>
<ImageView
android:id="@+id/order_back"
android:id="@+id/title_back"
style="@style/title_image_back"
/>
......@@ -47,3 +48,4 @@
android:background="@color/cl_white"/>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -9,16 +11,16 @@
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/time_title"
android:id="@+id/rl_title"
style="@style/title">
<TextView
android:id="@+id/title_text"
android:id="@+id/tv_title"
style="@style/text_title"
android:text="工单记录"/>
<ImageView
android:id="@+id/receiving_back"
android:id="@+id/title_back"
style="@style/title_image_back"/>
<ImageView
......@@ -38,7 +40,7 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/time_seacher"
android:id="@+id/rl_seacher"
style="@style/title"
android:visibility="gone">
......@@ -58,7 +60,7 @@
android:src="@mipmap/seacher"/>
<TextView
android:id="@+id/quit"
android:id="@+id/tv_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
......@@ -80,7 +82,7 @@
</RelativeLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/receiving_refersh"
android:id="@+id/swipe_refersh"
android:layout_width="match_parent"
android:layout_height="match_parent">
......@@ -91,4 +93,5 @@
android:background="#f5f5f5"
/>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -220,7 +220,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="113.3dp"
android:layout_marginTop="46.7dp"
android:layout_marginTop="36.7dp"
android:background="@drawable/btn_red_react"
android:gravity="center"
android:orientation="horizontal"
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cl_home_listview_bg"
......@@ -17,7 +19,7 @@
/>
<ImageView
android:id="@+id/back_order_finish"
android:id="@+id/tv_back"
style="@style/title_image_back"/>
</RelativeLayout>
......@@ -77,7 +79,7 @@
/>
<TextView
android:id="@+id/text_one_value"
android:id="@+id/tv_product"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/text_one_text"
......@@ -117,7 +119,7 @@
/>
<TextView
android:id="@+id/text_two_value"
android:id="@+id/tv_brand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
......@@ -156,7 +158,7 @@
/>
<TextView
android:id="@+id/text_six_value"
android:id="@+id/tv_serve"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
......@@ -194,7 +196,7 @@
/>
<EditText
android:id="@+id/et_input"
android:id="@+id/et_serve_info"
android:layout_width="@dimen/dp_267"
android:layout_height="@dimen/dp_147"
android:layout_marginLeft="@dimen/dp_8"
......@@ -272,7 +274,7 @@
/>
<com.dayu.bigfish.ui.views.SwitchImage
android:id="@+id/image_switch"
android:id="@+id/iv_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
......@@ -290,11 +292,10 @@
/>
<RelativeLayout
android:id="@+id/play_view"
android:id="@+id/rl_pay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/switch_view"
>
<RelativeLayout
......@@ -313,7 +314,7 @@
/>
<EditText
android:id="@+id/edit_door_value"
android:id="@+id/et_door_price"
android:layout_width="@dimen/dp_205"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
......@@ -361,7 +362,7 @@
/>
<EditText
android:id="@+id/edit_serve_value"
android:id="@+id/et_serve_price"
android:layout_width="@dimen/dp_205"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
......@@ -410,7 +411,7 @@
/>
<EditText
android:id="@+id/edit_materials_value"
android:id="@+id/et_materials_price"
android:layout_width="@dimen/dp_205"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
......@@ -458,7 +459,7 @@
/>
<EditText
android:id="@+id/edit_other_value"
android:id="@+id/et_other_price"
android:layout_width="@dimen/dp_205"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
......@@ -490,7 +491,7 @@
/>
<EditText
android:id="@+id/et_up_input"
android:id="@+id/et_door_info"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_163"
android:layout_below="@id/up_other"
......@@ -511,7 +512,7 @@
android:id="@+id/ll_all_money"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/play_view"
android:layout_below="@+id/rl_pay"
android:layout_marginLeft="@dimen/dp_13.3"
android:layout_marginRight="@dimen/dp_13.3"
android:layout_marginTop="15.7dp"
......@@ -575,4 +576,5 @@
</RelativeLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<RelativeLayout
android:id="@+id/receiving_title"
android:id="@+id/title_back"
style="@style/title"
>
<TextView
android:id="@+id/order_title_num"
android:id="@+id/tv_title"
style="@style/text_title"
/>
......@@ -27,7 +29,7 @@
/>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/receiving_refersh"
android:id="@+id/swipe_refersh"
android:layout_width="match_parent"
android:layout_height="match_parent">
......@@ -36,11 +38,12 @@
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/receiving_listview"
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f5f5f5"
/>
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -9,7 +11,7 @@
>
<ImageView
android:id="@+id/set_back"
android:id="@+id/title_back"
style="@style/title_image_back"
/>
......@@ -244,4 +246,5 @@
android:textColor="@color/cl_white"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -10,13 +12,13 @@
>
<TextView
android:id="@+id/title_text"
android:id="@+id/tv_tile"
style="@style/text_title"
android:text="@string/tv_home_tab_updata_subscribe_time"
/>
<ImageView
android:id="@+id/receiving_back"
android:id="@+id/iv_back"
style="@style/title_image_back"
/>
......@@ -42,7 +44,7 @@
/>
<RelativeLayout
android:id="@+id/time_one"
android:id="@+id/rl_day"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:background="@color/cl_white"
......@@ -58,15 +60,16 @@
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_15"
/>
<TextView
android:id="@+id/text_date_value"
android:layout_toRightOf="@id/text_date"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_21.3"
android:id="@+id/tv_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/cl_selector_hui"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_21.3"
android:layout_toRightOf="@id/text_date"
android:hint="@string/tv_home_tab_updata_subscribe_data"
android:textColor="@color/cl_selector_hui"
android:textSize="@dimen/sp_15"
/>
</RelativeLayout>
......@@ -76,7 +79,7 @@
/>
<RelativeLayout
android:id="@+id/time_two"
android:id="@+id/rl_time"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:background="@color/cl_white"
......@@ -92,15 +95,16 @@
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_15"
/>
<TextView
android:id="@+id/text_time_value"
android:layout_toRightOf="@id/text_time"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_21.3"
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/cl_selector_hui"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_21.3"
android:layout_toRightOf="@id/text_time"
android:hint="@string/tv_home_tab_updata_subscribe_time_two"
android:textColor="@color/cl_selector_hui"
android:textSize="@dimen/sp_15"
/>
</RelativeLayout>
......@@ -108,9 +112,10 @@
<TextView
style="@style/line"
/>
<TextView
style="@style/line"
android:layout_below="@id/time_one"
android:layout_below="@id/rl_day"
/>
<RelativeLayout
......@@ -132,7 +137,7 @@
/>
<EditText
android:id="@+id/et_input"
android:id="@+id/et_info"
android:layout_width="@dimen/dp_267"
android:layout_height="@dimen/dp_147"
android:layout_marginLeft="@dimen/dp_8"
......@@ -141,17 +146,17 @@
android:background="@drawable/subscribe_time_shape"
android:gravity="top"
android:hint="@string/tv_time_text_edit_text"
android:inputType="text"
android:maxLength="200"
android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_11"
android:inputType="text"
android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui"/>
</RelativeLayout>
</LinearLayout>
<Button
android:id="@+id/submit_button"
android:id="@+id/btn_submit"
android:layout_width="@dimen/size_login_button_weidth"
android:layout_height="wrap_content"
android:layout_below="@id/linearLayout_time"
......@@ -163,4 +168,5 @@
android:textColor="@color/cl_white"
android:textSize="@dimen/size_login_button_text"
/>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/ll_web"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -14,7 +17,7 @@
/>
<ImageView
android:id="@+id/receiving_back"
android:id="@+id/title_back"
style="@style/title_image_back"
/>
......@@ -24,9 +27,5 @@
style="@style/card_line"
/>
<com.github.lzyzsd.jsbridge.BridgeWebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.github.lzyzsd.jsbridge.BridgeWebView>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cl_home_listview_bg"
......@@ -18,7 +20,7 @@
/>
<ImageView
android:id="@+id/receiving_back"
android:id="@+id/iv_back"
style="@style/title_image_back"
/>
......@@ -53,7 +55,7 @@
/>
<EditText
android:id="@+id/et_withdrawals_accout"
android:id="@+id/et_accout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="21.3dp"
......@@ -101,7 +103,7 @@
/>
<EditText
android:id="@+id/et_withdrawals_name"
android:id="@+id/et_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="21.3dp"
......@@ -149,7 +151,7 @@
/>
<EditText
android:id="@+id/et_withdrawals_phone"
android:id="@+id/et_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="21.3dp"
......@@ -175,7 +177,7 @@
</LinearLayout>
<TextView
android:id="@+id/tv_account_comfirm"
android:id="@+id/tv_comfirm"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="@dimen/dp_16.7"
......@@ -187,4 +189,5 @@
android:textColor="@color/cl_white"
android:textSize="14.7sp"
/>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cl_home_edit_text"
......@@ -17,16 +19,17 @@
/>
<ImageView
android:id="@+id/back_order_finish"
android:id="@+id/titile_back"
style="@style/title_image_back"/>
</RelativeLayout>
<android.support.v4.view.ViewPager
android:id="@+id/vp_preview_picture"
android:id="@+id/vp_preview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/cl_order_text_one"
android:unselectedAlpha="1">
</android.support.v4.view.ViewPager>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -36,7 +36,7 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/text_one_one"
android:id="@+id/tv_order_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/text_title_order"
......@@ -59,7 +59,7 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/text_two_two"
android:id="@+id/tv_order_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/text_one"
......@@ -105,7 +105,7 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/text_three_three"
android:id="@+id/tv_product"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_serve_name"
......@@ -128,7 +128,7 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/text_foure_foure"
android:id="@+id/tv_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/text_three"
......@@ -142,7 +142,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/text_foure_foure"
android:layout_below="@id/tv_type"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="上门时间"
......@@ -153,7 +153,7 @@
android:id="@+id/tv_door_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/text_foure_foure"
android:layout_below="@id/tv_type"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/text_foure"
......@@ -269,7 +269,7 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/two_text_two_text"
android:id="@+id/tv_customer_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/two_text_one"
......@@ -292,10 +292,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/two_text_three_text"
android:id="@+id/tv_customer_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/two_text_two_text"
android:layout_below="@id/tv_customer_type"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_three"
......@@ -315,10 +315,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/two_text_four_text"
android:id="@+id/tv_contact_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/two_text_three_text"
android:layout_below="@id/tv_customer_name"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_four"
......@@ -338,10 +338,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/two_text_five_text"
android:id="@+id/tv_customer_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/two_text_four_text"
android:layout_below="@id/tv_contact_mode"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_five"
......@@ -404,14 +404,15 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/three_text_two_text"
android:id="@+id/tv_brand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/three_text_two"
android:layout_alignBottom="@+id/three_text_two"
android:layout_alignLeft="@+id/three_text_five_text"
android:layout_alignStart="@+id/three_text_five_text"
android:text="暂无数据"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/three_text_two"
android:text="暂无品牌"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -427,10 +428,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/three_text_three_text"
android:id="@+id/tv_model"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/three_text_two_text"
android:layout_below="@id/tv_brand"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/three_two_two"
......@@ -451,10 +452,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/three_text_five_text"
android:id="@+id/tv_warranty_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/three_text_three_text"
android:layout_below="@id/tv_model"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/three_four_four"
......@@ -505,7 +506,6 @@
android:id="@+id/four_text_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_10"
android:text="收费记录"
......@@ -524,7 +524,7 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/four_text_one_text"
android:id="@+id/tv_total_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_one"
......@@ -547,10 +547,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/four_text_two_text"
android:id="@+id/tv_door_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_one_text"
android:layout_below="@id/tv_total_money"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_three"
......@@ -571,10 +571,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/four_text_four_text"
android:id="@+id/tv_serve_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_two_text"
android:layout_below="@id/tv_door_price"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_five"
......@@ -594,10 +594,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/four_text_six_text"
android:id="@+id/tv_material_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_four_text"
android:layout_below="@id/tv_serve_price"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_seven"
......@@ -617,10 +617,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/four_text_eight_text"
android:id="@+id/tv_other_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_six_text"
android:layout_below="@id/tv_material_price"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_nine"
......@@ -640,10 +640,10 @@
android:textSize="@dimen/sp_13.3"/>
<TextView
android:id="@+id/four_text_nine_text"
android:id="@+id/tv_remarks"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_eight_text"
android:layout_below="@id/tv_other_price"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_ten"
......
......@@ -202,6 +202,7 @@
<string name="pre_look">预览</string>
<string name="loading">加载中</string>
<string name="order_subsidy">工单补贴</string>
<string name="order_save_success">数据保存成功</string>
<!--消息-->
<string name="message_system">系统通知</string>
......
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