Commit 915178f0 authored by 陈前's avatar 陈前

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/res/values/styles.xml
parents 89a5e5c3 12c81300
......@@ -3,10 +3,13 @@
<words>
<w>baozheng</w>
<w>caocao</w>
<w>exps</w>
<w>guanyu</w>
<w>huanggai</w>
<w>inputer</w>
<w>likui</w>
<w>mawu</w>
<w>patt</w>
<w>xishi</w>
<w>zhangfei</w>
<w>zhouyu</w>
......
......@@ -20,11 +20,6 @@
android:label="@string/main_title"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustUnspecified|stateHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
......@@ -49,7 +44,14 @@
<activity
android:name=".ui.payment.PaymentActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
android:windowSoftInputMode="adjustUnspecified|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
This diff is collapsed.
......@@ -69,8 +69,8 @@ public class App extends Application {
.callback(this)
.start();
// 初始化异常处理
initEx();
// 初始化异常处理
// initEx();
//初始化Fragment框架
initFragment();
......@@ -147,8 +147,6 @@ public class App extends Application {
}
public static void reStartApp() {
// 重启
Intent intent = new Intent(instance.getApplicationContext(), SplashActivity
......
......@@ -4,10 +4,6 @@ import android.view.View;
import android.widget.AdapterView;
import com.blankj.utilcode.util.ToastUtils;
import java.util.ArrayList;
import java.util.List;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
......@@ -16,6 +12,10 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.login.fragment.bean.Shops;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
/**
* 绑定款台界面
......@@ -39,6 +39,13 @@ public class BindingCounterFragment extends BaseFragment<LoginPresenter,
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("绑定款台");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
if (LoginPresenter.userStoreInfo.getMerchant() != null) {
mViewBinding.tvNickname.setText(LoginPresenter.userStoreInfo.getMerchant().getMerName
());
......@@ -94,7 +101,7 @@ public class BindingCounterFragment extends BaseFragment<LoginPresenter,
}
break;
case R.id.ll_new_counter: {
isNewCounterCount= 0;
isNewCounterCount = 0;
setNewCounter(true);
}
......@@ -109,7 +116,6 @@ public class BindingCounterFragment extends BaseFragment<LoginPresenter,
/**
* 设置新增款台或者绑定款台的ui信息
*
*/
private void setNewCounter(Boolean b) {
if (b) {
......@@ -129,7 +135,8 @@ public class BindingCounterFragment extends BaseFragment<LoginPresenter,
mShops = shops;
setType();
}
private void setType(){
private void setType() {
if (mShops != null && mShops.getCashers() != null && mShops.getCashers().size() > 0) {
isNewCounterCount = 1;
} else {
......
......@@ -11,6 +11,7 @@ import com.xingdata.zzdpos.databinding.FragmentChoiceStoreBinding;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.login.fragment.bean.Shops;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
......@@ -33,7 +34,13 @@ public class ChoiceStoreFragment extends BaseFragment<LoginPresenter,
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("绑定款台");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
mViewBinding.setOnClickListener(view -> {
switch (view.getId()) {
......
......@@ -15,6 +15,7 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
......@@ -46,6 +47,13 @@ public class CreateStoreFragment extends BaseFragment<LoginPresenter,
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("创建门店");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
if (startway == 1) {
mViewBinding.etNickname.setVisibility(View.VISIBLE);
mViewBinding.tvNickname.setVisibility(View.GONE);
......
......@@ -2,6 +2,7 @@ package com.xingdata.zzdpos.ui.login.fragment;
import android.text.InputFilter;
import android.text.InputType;
import android.view.View;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
......@@ -10,6 +11,7 @@ import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentInputPasswordBinding;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.util.OnClickListener;
/**
* 输入密码界面
......@@ -32,6 +34,13 @@ public class InputPasswordFragment extends BaseFragment<LoginPresenter,
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("输入密码");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
InputFilter[] inputFilter = new InputFilter[]{new InputFilter.LengthFilter(6)};
mViewBinding.etOnePassword.setInputType(InputType.TYPE_CLASS_NUMBER | InputType
.TYPE_NUMBER_VARIATION_PASSWORD);
......
......@@ -45,7 +45,6 @@ public class SignInFragment extends BaseFragment<LoginPresenter,
.TYPE_NUMBER_VARIATION_PASSWORD);
mViewBinding.etPwd.setFilters(inputFilter);
if (SPUtils.getInstance().getInt(C.SP_KEY.IS_SHOW_SIGNUP_BTN) != 0) {
mViewBinding.tvSignUp.setVisibility
(View.INVISIBLE);
......
package com.xingdata.zzdpos.ui.login.fragment;
import android.view.View;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSmsCodeBinding;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.concurrent.TimeUnit;
......@@ -39,6 +42,13 @@ public class SmsCodeFragment extends BaseFragment<LoginPresenter,
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("发送验证码");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
// mViewBinding.tvTwo.setOnClickListener(view -> mPresenter.checkSmsCode("",""));
mViewBinding.setOnClickListener(view -> {
switch (view.getId()) {
......@@ -51,7 +61,7 @@ public class SmsCodeFragment extends BaseFragment<LoginPresenter,
case R.id.btn_next: {
mLoadingDialog.show((BaseActivity) getActivity());
mPresenter.checkSmsCode(mViewBinding.etPhone.getText().toString(),
mViewBinding.etSmsCode.getText().toString(),mLoadingDialog);
mViewBinding.etSmsCode.getText().toString(), mLoadingDialog);
// start(mPresenter.inputPasswordFragment);
}
......
......@@ -3,9 +3,12 @@ package com.xingdata.zzdpos.ui.payment;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityPaymentBinding;
import com.xingdata.zzdpos.ui.payment.fragment.PaymentFragment;
public class PaymentActivity extends BaseActivity<PaymentPresenter, ActivityPaymentBinding> implements PaymentContract.View {
private PaymentFragment mPaymentFragment = new PaymentFragment();
@Override
public int getLayoutId() {
return R.layout.activity_payment;
......@@ -13,6 +16,7 @@ public class PaymentActivity extends BaseActivity<PaymentPresenter, ActivityPaym
@Override
public void initView() {
loadRootFragment(R.id.f_payment, mPaymentFragment);
}
}
......@@ -10,5 +10,11 @@ interface PaymentContract {
}
abstract class Presenter extends BasePresenter<PaymentContract.View> {
/**
* 收款界面 - 点击收款
*
* @param amt 金额
*/
public abstract void clickSettle(Long amt);
}
}
\ No newline at end of file
......@@ -5,4 +5,9 @@ public class PaymentPresenter extends PaymentContract.Presenter {
@Override
public void onAttached() {
}
@Override
public void clickSettle(Long amt) {
}
}
//package com.xingdata.zzdpos.ui.payment.fragment;
//
//import com.xingdata.zzdpos.base.BaseFragment;
//import com.xingdata.zzdpos.ui.payment.PaymentPresenter;
//
///**
// * Created by Eurus on 2017/12/21.
// */
//
//public class CalculatorFragment extends BaseFragment<PaymentPresenter,> {
//}
package com.xingdata.zzdpos.ui.payment.fragment;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentPaymentBinding;
import com.xingdata.zzdpos.ui.payment.PaymentPresenter;
import com.xingdata.zzdpos.ui.payment.view.CalculatorView;
import com.xingdata.zzdpos.util.ConvertUtil;
public class PaymentFragment extends BaseFragment<PaymentPresenter, FragmentPaymentBinding> {
private CalculatorView mCalculatorView = new CalculatorView();
@Override
public int getLayoutId() {
return R.layout.fragment_payment;
}
@Override
public void initView() {
loadRootFragment(R.id.f_inputer, mCalculatorView);
mCalculatorView.setOnResultChangeListener((exp, result) -> {
mViewBinding.tvExp.setText(exp);
String strResult = ConvertUtil.fenToYuan(result);
mViewBinding.tvResult.setText(strResult);
mViewBinding.tvAmt.setText(strResult);
});
mCalculatorView.setOnSettleClickListener(result -> {
if (result > 0) mPresenter.clickSettle(result);
});
}
}
......@@ -2,7 +2,9 @@ package com.xingdata.zzdpos.ui.payment.view;
import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.LogUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.ViewCalculatorBinding;
......@@ -16,9 +18,19 @@ import java.util.regex.Pattern;
public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculatorBinding> {
private String mExp;
private String mValue;
private String mLast;
private OnResultChangeListener mOnResultChangeListener;
private onSettleClickListener mOnSettleClickListener;
public CalculatorView() {
mExp = "";
mValue = "";
mLast = "";
}
public interface OnResultChangeListener {
void onResultChange(String exp, Long result);
}
......@@ -36,39 +48,58 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
public void initView() {
View.OnClickListener mOnClickListener = view -> {
switch (view.getId()) {
case R.id.btn_add:
break;
case R.id.btn_sub:
break;
case R.id.btn_mul:
break;
case R.id.btn_div:
break;
case R.id.btn_point:
break;
case R.id.btn_del:
case R.id.tv_del:
delete();
break;
case R.id.btn_clear:
case R.id.tv_clear:
clear();
break;
case R.id.btn_settle:
case R.id.tv_settle:
settle();
break;
default:
LogUtils.e("mExp : " + mExp + "\nmValue : " + mValue + "\nmLast" + mLast);
if (view instanceof TextView) {
String str = ((TextView) view).getText().toString();
String[] mExps = mExp.split("[+\\-×÷]");
if (mLast.matches("[+\\-×÷]")) mValue = "";
else if (mExps.length > 1) mValue = mExps[mExps.length - 1];
else mValue = mExp.replaceAll("[+\\-×÷]", "");
//限制位数
if (str.matches("[0-9]+") && mValue.split("[.]").length > 1 && mValue.split("[.]")[1].length() == 2)
return;
//限制小数点
if ((mExp.length() == 0 || mValue.contains(".")) && str.matches("[.]"))
return;
//限制符号
if (mLast.matches("[+\\-×÷.]") && str.matches("[+\\-×÷.]"))
return;
mLast = str;
mExp += str;
}
break;
}
if (mOnResultChangeListener != null) {
mOnResultChangeListener.onResultChange(mExp, ConvertUtil.yuanToFen(parseExp(mExp)));
}
};
mViewBinding.setOnClick(mOnClickListener);
}
/**
* 删除
*/
private void delete() {
if (mExp.length() > 0) {
mExp = mExp.substring(0, mExp.length() - 1);
if (mExp.length() > 0) mLast = mExp.substring(mExp.length() - 1, mExp.length());
else mLast = "";
}
}
/**
......@@ -104,12 +135,11 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
.replaceAll("×", "*").replaceAll("÷", "/");
String minExp = "^((\\d+(\\.\\d+)?)|(\\[-\\d+(\\.\\d+)?]))[+\\-*/]((\\d+(\\.\\d+)?)|(\\[-\\d+(\\.\\d+)?]))$";
if (exp.matches(minExp)) {
String result = calculate(exp);
return Double.parseDouble(result) >= 0 ? result : "[" + result + "]";
} else if (exp.matches("[0-9]+")) {
return calculate(exp);
} else if (exp.matches("[0-9.]+")) {
return exp;
} else if (exp.length() == 0) {
return "0";
return "0.0";
}
String noParentheses = "^[^()]+$";
String priorOperatorExp = "(((\\d+(\\.\\d+)?)|(\\[-\\d+(\\.\\d+)?]))[*/]((\\d+(\\.\\d+)?)|(\\[-\\d+(\\.\\d+)?])))";
......@@ -123,7 +153,6 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
} else {
patt = Pattern.compile(operatorExp);
mat = patt.matcher(exp);
if (mat.find()) {
String tempMinExp = mat.group();
exp = exp.replaceFirst(operatorExp, parseExp(tempMinExp));
......@@ -131,7 +160,7 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
}
return parseExp(exp);
}
String minParentheses = "\\([^\\(\\)]+\\)";
String minParentheses = "\\([^()]+\\)";
Pattern patt = Pattern.compile(minParentheses);
Matcher mat = patt.matcher(exp);
if (mat.find()) {
......@@ -168,11 +197,12 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
}
public void setmOnResultChangeListener(OnResultChangeListener mOnResultChangeListener) {
this.mOnResultChangeListener = mOnResultChangeListener;
public void setOnResultChangeListener(OnResultChangeListener onResultChangeListener) {
this.mOnResultChangeListener = onResultChangeListener;
mOnResultChangeListener.onResultChange(mExp, ConvertUtil.yuanToFen(parseExp(mExp)));
}
public void setmOnSettleClickListener(onSettleClickListener mOnSettleClickListener) {
this.mOnSettleClickListener = mOnSettleClickListener;
public void setOnSettleClickListener(onSettleClickListener onSettleClickListener) {
this.mOnSettleClickListener = onSettleClickListener;
}
}
......@@ -71,7 +71,8 @@ public class ConvertUtil {
*/
public static Long yuanToFen(String yuan) {
yuan = StringUtils.isEmpty(yuan) ? "0" : yuan;
return (long) (Double.valueOf(yuan) * 100);
BigDecimal b = new BigDecimal(Double.valueOf(yuan) * 100);
return b.setScale(0, BigDecimal.ROUND_HALF_UP).longValue();
}
/**
......@@ -95,11 +96,11 @@ public class ConvertUtil {
if (l == null) return "0";
return String.valueOf(l);
}
/**
* 分转元去掉.0 ROUND_DOWN
*
* @param fen
* 分
* @param fen 分
* @return 元
*/
public static String fenToYuanNoZero(Long fen) {
......@@ -121,13 +122,11 @@ public class ConvertUtil {
/**
* 分转元保留2位小數
*
* @param fen
* 分
* @param fen 分
* @return 元
*/
public static String fenToYuan2(Long fen) {
if (fen==null)
{
if (fen == null) {
return "0.00";
}
BigDecimal decimal = new BigDecimal(fen);
......@@ -137,8 +136,7 @@ public class ConvertUtil {
/**
* 折扣率转换最大100
*
* @param dis
* 分
* @param dis 分
* @return 元
*/
public static String discount(Long dis) {
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners android:radius="@dimen/all_shape_radius" />
<corners android:radius="@dimen/all_radius" />
<solid android:color="@color/blue" />
<solid android:color="@color/blue_mawu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners android:radius="@dimen/all_shape_radius" />
<corners android:radius="@dimen/all_radius" />
<solid android:color="@color/gray" />
<solid android:color="@color/gray_huanggai" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:width="2dp"
android:color="@color/gray_huanggai"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners android:radius="@dimen/all_radius" />
<solid android:color="@color/red_guanyu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_blue_round_rectangle_strokeless" android:state_pressed="true" />
<item android:drawable="@drawable/shape_red_round_rectangle_strokeless" android:state_pressed="true" />
<item android:drawable="@drawable/shape_gray_round_rectangle_stroke" android:state_enabled="false" />
<item android:drawable="@drawable/shape_gradient_gray_round_rectangle_stroke" />
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_red_round_rectangle_strokeless_noradius" android:state_pressed="true" />
<item android:drawable="@drawable/shape_gray_round_rectangle_stroke_noradius" android:state_enabled="false" />
<item android:drawable="@drawable/shape_gradient_gray_round_rectangle_stroke_noradius" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_blue_round_rectangle_strokeless" android:state_pressed="true" />
<item android:drawable="@drawable/shape_red_round_rectangle_strokeless" android:state_pressed="true" />
<item android:drawable="@drawable/shape_grey_round_rectangle_strokeless" android:state_enabled="false" />
<item android:drawable="@drawable/shape_gradient_blue_round_rectangle" />
<item android:drawable="@drawable/shape_gradient_red_round_rectangle" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_red_round_rectangle_strokeless_noradius" android:state_pressed="true"/>
<item android:drawable="@drawable/shape_grey_round_rectangle_strokeless_noradius" android:state_enabled="false"/>
<item android:drawable="@drawable/shape_gradient_red_round_rectangle_noradius"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<stroke
android:width="@dimen/all_line_width"
android:width="@dimen/all_slight_line_width"
android:color="@color/passive_stroke" />
<gradient
android:angle="90"
android:endColor="@color/positive_gradient_end"
android:startColor="@color/positive_gradient_start" />
android:endColor="@color/passive_gradient_end"
android:startColor="@color/passive_gradient_start" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius"/>
<stroke
android:width="@dimen/all_line_width"
android:color="@color/red_guanyu"/>
<gradient
android:angle="90"
android:endColor="@color/red_guanyu"
android:startColor="@color/red_guanyu"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="@dimen/all_line_width"
android:color="@color/red_guanyu"/>
<gradient
android:angle="90"
android:endColor="@color/red_guanyu"
android:startColor="@color/red_guanyu"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<corners android:radius="@dimen/all_shape_radius"/>
<stroke
android:width="@dimen/edit_border"
android:color="@color/gary" />
android:color="@color/gary"/>
<solid android:color="@color/lyt_main_bg" />
<solid android:color="@color/lyt_main_bg"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="@dimen/edit_border"
android:color="@color/gary"/>
<solid android:color="@color/lyt_main_bg"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<solid android:color="@color/gray" />
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<solid android:color="@color/pressed_solid" />
<solid android:color="@color/gray" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius"/>
<solid android:color="@color/red_guanyu"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/red_guanyu"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/gray_huanggai"/>
</shape>
</item>
<item android:bottom="1dp">
<shape>
<solid android:color="@color/appBack"/>
</shape>
</item>
</layer-list>
\ No newline at end of file
......@@ -111,7 +111,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/selector_gradient_blue_button_background"
android:background="@drawable/selector_gradient_red_button_background"
android:onClick="@{onClickListener}"
android:text="@{ok}"
android:textColor="@color/white"/>
......
......@@ -6,47 +6,35 @@
android:layout_height="match_parent"
android:orientation="vertical">
<Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/store_product_bg"
android:title="收款"
android:titleTextColor="@color/white" />
<LinearLayout
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/store_product_bg"
android:orientation="vertical">
android:layout_height="?attr/actionBarSize"
android:background="@color/black_zhangfei">
</LinearLayout>
<ImageButton
android:layout_width="@dimen/title_height"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/all_go_back"
android:gravity="center"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_white" />
<LinearLayout
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/payment_title"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_sub_title_size" />
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/white"
android:gravity="end|center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="小计:" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="40.00"
android:textColor="@color/deep_red" />
</LinearLayout>
<FrameLayout
android:id="@+id/f_payment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="7" />
android:layout_height="match_parent" />
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -68,7 +68,7 @@
<Button
android:id="@+id/btn_custom"
style="@style/button_positive"
style="@style/button_positive_allradius"
android:layout_width="@dimen/dialog_button_width"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
......@@ -87,7 +87,7 @@
<Button
android:id="@+id/btn_cancel"
style="@style/button_positive_bg_gray"
style="@style/button_positive_bg_gray_noradius"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
......@@ -95,7 +95,7 @@
<Button
android:id="@+id/btn_ok"
style="@style/button_positive"
style="@style/button_positive_noradius"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
......
......@@ -14,8 +14,15 @@
android:layout_height="match_parent"
android:background="@color/appBack"
android:gravity="center"
android:orientation="vertical">'
android:orientation="vertical">
<include android:id="@+id/ic_title" layout="@layout/title"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_logo"
......@@ -55,16 +62,15 @@
<Button
android:id="@+id/btn_next"
style="@style/view_base"
style="@style/button"
android:layout_marginTop="@dimen/et_margin_logo"
android:background="@drawable/blue_border"
android:onClick="@{onClickListener}"
android:text="@string/login_smscodefragment_btn_next"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
/>
<RelativeLayout
style="@style/view_base"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/et_margin_logo">
<TextView
......@@ -72,10 +78,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/all_margin_left"
android:onClick="@{onClickListener}"
android:text="已有账号 >"
android:textColor="@color/white"/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/black_zhangfei"
android:gravity="bottom"
android:paddingBottom="@dimen/all_margin">
<TextView
android:id="@+id/tv_exp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_spacing"
android:layout_marginEnd="@dimen/all_margin"
android:gravity="end|center_vertical"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_title_size"
app:layout_constraintBottom_toTopOf="@id/tv_result"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:id="@+id/tv_money_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:gravity="end|center_vertical"
android:text="@string/money_rmb"
android:textColor="@color/white_caocao"
android:textSize="@dimen/fragment_settle_bigtextsize"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/tv_result" />
<TextView
android:id="@+id/tv_result"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_margin"
android:gravity="end|center_vertical"
android:textColor="@color/white_caocao"
android:textSize="@dimen/fragment_settle_bigtextsize"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/tv_money_hint"
app:layout_constraintRight_toRightOf="parent" />
</android.support.constraint.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/white_caocao"
android:gravity="end|center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing"
android:text="@string/payment_total"
android:textSize="@dimen/all_text_size" />
<TextView
android:id="@+id/tv_amt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_margin"
android:textColor="@color/deep_red"
android:textSize="@dimen/all_sub_title_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginBottom="@dimen/all_margin_big"
android:background="@color/gray_huanggai" />
<FrameLayout
android:id="@+id/f_inputer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="7" />
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -13,8 +13,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack"
android:orientation="vertical">
<include android:id="@+id/ic_title" layout="@layout/title"></include>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">'
android:orientation="vertical">
<ImageView
android:id="@+id/iv_logo"
......@@ -80,13 +87,11 @@
<Button
android:id="@+id/btn_next"
style="@style/view_base"
style="@style/button"
android:layout_marginTop="@dimen/et_margin_logo"
android:background="@drawable/blue_border"
android:onClick="@{onClickListener}"
android:text="@string/login_smscodefragment_btn_next"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
/>
<RelativeLayout
android:layout_width="match_parent"
......@@ -97,13 +102,13 @@
android:id="@+id/tv_existing_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_margin_left"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/all_margin_left"
android:onClick="@{onClickListener}"
android:text="已有账号 >"
android:textColor="@color/white"/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="onClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"/>
</data>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/singleline"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/title_height"
android:layout_height="match_parent"
android:gravity="center"
android:onClick="@{onClickListener}"
android:padding="16dp"
android:src="@mipmap/back_white"/>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="标题"
android:textColor="@color/white"
android:textSize="@dimen/text_secondary_title"
android:textStyle="bold"/>
</RelativeLayout>
</layout>
\ No newline at end of file
This diff is collapsed.
......@@ -14,6 +14,7 @@
<color name="black_transparent">#88000000</color>
<color name="borderYello">#ffa002</color>
<color name="red900">#B71c1c</color>
<color name="bg">#f5f7f9</color>
<!--提示颜色-->
<color name="succ">#2484e8</color>
<color name="error">#fb3b3b</color>
......@@ -119,6 +120,7 @@
<color name="red_guanyu">#b4282d</color>
<color name="red_xishi">#e57b7b</color>
<color name="gray_zhouyu">#f1f3f7</color>
<color name="gray_huanggai">#afb9c3</color>
<color name="white_caocao">#ffffff</color>
<color name="black_zhangfei">#233142</color>
<color name="black_baozheng">#121212</color>
......
<resources>
<!--ALL-->
<dimen name="all_shape_radius">3dp</dimen>
<dimen name="all_radius">100dp</dimen>
<dimen name="all_line_width">0.5dp</dimen>
<dimen name="all_slight_line_width">0.5dp</dimen>
<dimen name="all_margin">18dp</dimen>
......@@ -30,6 +31,8 @@
<dimen name="text_primary_title">28sp</dimen>
<!--二级标题-->
<dimen name="text_secondary_title">20sp</dimen>
<!--三级标题-->
<dimen name="text_three_title">18sp</dimen>
<!--标题控件宽度-->
<dimen name="title_width">84dp</dimen>
<!--Dialog-->
......@@ -39,7 +42,7 @@
<dimen name="dialog_padding">12sp</dimen>
<dimen name="dialog_button_width">190dp</dimen>
<!--提示对话框-->
<dimen name="prompt_dialog_width">450dp</dimen>
<dimen name="prompt_dialog_width">300dp</dimen>
<dimen name="prompt_dialog_height">250dp</dimen>
<dimen name="prompt_dialog_logo_size">64dp</dimen>
<!--商品页面-->
......@@ -91,22 +94,23 @@
<dimen name="smscodefragment_drop_get_sms_width">84dp</dimen>
<!--创建门店界面-->
<dimen name="item_title_width">80dp</dimen>
<dimen name="item_title_margin">15dp</dimen>
<dimen name="item_title_margin">5dp</dimen>
<dimen name="bar_margin">15dp</dimen>
<dimen name="create_store_btn_width">110dp</dimen>
<dimen name="create_store_btn_height">40dp</dimen>
<dimen name="create_store_btn_height">44dp</dimen>
<!--绑定款台界面-->
<dimen name="new_counter_btn_width">150dp</dimen>
<dimen name="new_counter_btn_height">40dp</dimen>
<dimen name="new_counter_btn_width">120dp</dimen>
<dimen name="new_counter_btn_height">30dp</dimen>
<dimen name="new_counter_btn_margin_left">10dp</dimen>
<dimen name="bingding_counter_btn_width">110dp</dimen>
<dimen name="bingding_counter_btn_height">40dp</dimen>
<dimen name="nicespinner_width">430dp</dimen>
<dimen name="nicespinner_width">280dp</dimen>
<dimen name="nicespinner_height">40dp</dimen>
<dimen name="counter_bar_width">350dp</dimen>
<dimen name="counter_input_height">45dp</dimen>
<dimen name="counter_tv_width">590dp</dimen>
<dimen name="center_height">230dp</dimen>
<dimen name="counter_input_height">43dp</dimen>
<dimen name="counter_input_select">35dp</dimen>
<dimen name="counter_tv_width">400dp</dimen>
<dimen name="center_height">380dp</dimen>
<!-- 副屏 -->
......
......@@ -227,6 +227,7 @@
<string name="login_createstorefragment_tv_storename">门店名称</string>
<string name="login_createstorefragment_tv_storetype">门店类型</string>
<string name="login_createstorefragment_tv_storeaddress">门店地址</string>
<string name="login_createstorefragment_tv_storeaddressmessage">详细地址</string>
<string name="login_createstorefragment_tv_storetype_hint">请选择门店类别(连锁/超市)</string>
<string name="login_createstorefragment_tv_storeaddress_hint">请选择门店地址(省/市/县)</string>
<string name="login_createstorefragment_et_nickname_hint">请输入昵称</string>
......@@ -493,5 +494,9 @@
<string name="inputer_mul">×</string>
<string name="inputer_div">÷</string>
<!--收款-->
<string name="payment_title">收款</string>
<string name="payment_total">总计:</string>
</resources>
......@@ -240,13 +240,26 @@
</style>
<style name="button_positive" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_blue_button_background</item>
<item name="android:background">@drawable/selector_gradient_red_button_background</item>
<item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_noradius" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_red_button_background_noradius</item>
<item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_allradius" parent="android:ButtonBar">
<item name="android:background">@drawable/red_border_allradius</item>
<item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_bg_gray" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_gray_button_background</item>
<item name="android:textColor">@color/blue</item>
......@@ -254,7 +267,13 @@
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_bg_gray_noradius" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_gray_button_background_noradius</item>
<item name="android:textColor">@color/blue</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="xuline_margin">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
......@@ -273,7 +292,7 @@
<style name="view_base" parent="android:ButtonBar">
<item name="android:layout_height">@dimen/et_height</item>
<item name="android:layout_width">match_parent</item>
<item name="android:gravity">center_vertical</item>
<item name="android:gravity">center</item>
<item name="android:layout_marginLeft">@dimen/all_margin_left</item>
<item name="android:layout_marginRight">@dimen/all_margin_left</item>
</style>
......@@ -282,6 +301,7 @@
<item name=" android:background">@drawable/transparent_border</item>
<item name="android:padding">@dimen/et_padding</item>
<item name=" android:saveEnabled">false</item>
<item name="android:gravity">center|left</item>
<item name="android:textSize">@dimen/et_textsize</item>
<item name="android:textColorHint">@color/hint</item>
</style>
......@@ -290,4 +310,22 @@
<item name="tabIndicatorColor">#FFF</item>
<item name="tabIndicatorHeight">0dp</item>
</style>
<style name="button" parent="view_base">
<item name=" android:background">@drawable/red_border</item>
<item name=" android:saveEnabled">false</item>
<item name="android:textSize">@dimen/et_textsize</item>
<item name=" android:textColor">@color/white</item>
<item name="android:textColorHint">@color/hint</item>
</style>
<style name="textView_title">
<item name="android:layout_height">@dimen/et_height</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_marginLeft">@dimen/all_margin_left</item>
<item name="android:textSize">@dimen/text_three_title</item>
<item name="android:background">@color/transparent</item>
<item name=" android:textColor">@color/gary</item>
<item name="android:gravity">center|left</item>
</style>
</resources>
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 to comment