Commit 2bad010b authored by zhang_z's avatar zhang_z

登录,收款,开单的多语言修正;

parent 55487432
package com.xingdata.zzdpos.model;
import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
/**
* 订单详情(购物车商品明细)
......@@ -33,27 +35,27 @@ public class Salepay {
public String getPayName() {
String payName = "";
if (payType==null){
payType=999;
if (payType == null) {
payType = 999;
}
switch (payType) {
case C.PAY_CHANNEL.CASH:
payName = "现金";
payName = App.instance.getApplicationContext().getString(R.string.settle_channel_cash);
break;
case C.PAY_CHANNEL.ALI:
payName = "支付宝";
payName = App.instance.getApplicationContext().getString(R.string.settle_channel_ali);
break;
case C.PAY_CHANNEL.WECHAT:
payName = "微信";
payName = App.instance.getApplicationContext().getString(R.string.settle_channel_wechat);
break;
case C.PAY_CHANNEL.BANK:
payName = "银行卡";
payName = App.instance.getApplicationContext().getString(R.string.settle_channel_bank);
break;
case C.PAY_CHANNEL.CARD:
payName = "储值卡";
payName = App.instance.getApplicationContext().getString(R.string.settle_channel_card);
break;
case C.PAY_CHANNEL.TALLY:
payName = "赊账";
payName = App.instance.getApplicationContext().getString(R.string.settle_channel_tally);
break;
default:
payName = "--";
......
......@@ -22,8 +22,8 @@ public class ErrorDialogActivity extends BaseActivity<ErrorDialogPresenter,
@Override
public void initView() {
setFinishOnTouchOutside(false);
mViewBinding.setCancel("忽略");
mViewBinding.setOk("重启");
mViewBinding.setCancel(getString(R.string.all_ignore));
mViewBinding.setOk(getString(R.string.all_reboot));
mViewBinding.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View view) {
......
......@@ -105,7 +105,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
promptDialog.show((BaseActivity) mContext);
}
promptDialog.setDialogType(PromptDialog.PROMPTDIALOG_ERROR, errorMsg).setCustomButton
("关闭", new View.OnClickListener() {
(getString(R.string.all_close), new View.OnClickListener() {
@Override
public void onClick(View view) {
promptDialog.dismiss();
......@@ -198,7 +198,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
closeLoading(loadingDialog);
if (isRegister) {
promptDialog.setDialogType(PromptDialog.PROMPTDIALOG_ERROR, errorMsg).setCustomButton
("关闭", new View.OnClickListener() {
(getString(R.string.all_close), new View.OnClickListener() {
@Override
public void onClick(View view) {
promptDialog.dismiss();
......
......@@ -4,9 +4,7 @@ package com.xingdata.zzdpos.ui.login.fragment;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import com.blankj.utilcode.util.KeyboardUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
......@@ -156,7 +154,7 @@ public class SmsCodeFragment extends BaseFragment<LoginPresenter,
@Override
public void onComplete() {
mViewBinding.tvGetsms.setEnabled(true);
mViewBinding.tvGetsms.setText("获取验证码");
mViewBinding.tvGetsms.setText(getString(R.string.login_smscodefragment_tv_get_sms));
}
});
}
......@@ -166,7 +164,7 @@ public class SmsCodeFragment extends BaseFragment<LoginPresenter,
disp.dispose();
}
mViewBinding.tvGetsms.setEnabled(true);
mViewBinding.tvGetsms.setText("获取验证码");
mViewBinding.tvGetsms.setText(getString(R.string.login_smscodefragment_tv_get_sms));
mPresenter.getLoginBean().setPhone_No(mViewBinding.etPhone.getText().toString());
mPresenter.getLoginBean().setSmsCode(mViewBinding.etSmsCode.getText().toString());
start(mPresenter.inputPasswordFragment);
......@@ -183,6 +181,6 @@ public class SmsCodeFragment extends BaseFragment<LoginPresenter,
if (null != disp && (!disp.isDisposed())) {
disp.dispose();
}
mViewBinding.tvGetsms.setText("获取验证码");
mViewBinding.tvGetsms.setText(getString(R.string.login_smscodefragment_tv_get_sms));
}
}
......@@ -513,7 +513,6 @@ public class SettlePresenter extends SettleContract.Presenter {
} catch (Exception e) {
ToastUtils.showShort("无法打印,请检查");
}
}
/**
......
package com.xingdata.zzdpos.ui.settle.adapter;
import android.annotation.SuppressLint;
import android.graphics.Paint;
import android.view.View;
......@@ -17,10 +18,11 @@ public class SaledetailAdapter extends BaseAdapter<Saledetail, ItemSettleSaledet
super(R.layout.item_settle_saledetail, new ArrayList<>());
}
@SuppressLint("SetTextI18n")
@Override
protected void convert(ItemSettleSaledetailBinding mViewBinding, Saledetail item) {
mViewBinding.tvName.setText(item.getMsId() > 0 ? "【换购】" + item.getSpuName() : item.getSpuName());
mViewBinding.tvCount.setText(String.valueOf(item.getDetailCnt()));
mViewBinding.tvCount.setText(" × " + item.getDetailCnt());
mViewBinding.tvPrice.setText(ConvertUtil.fenToYuan(item.getSkuPricePay(), true));
mViewBinding.tvAmt.setText(ConvertUtil.fenToYuan(item.getDetailAmt(), true));
......
......@@ -68,7 +68,7 @@
android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_margin"
android:text="实收金额"
android:text="@string/settle_pay_amt"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
app:layout_constraintEnd_toEndOf="parent"
......
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="onClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"/>
type="com.xingdata.zzdpos.util.OnClickListener" />
<variable
name="OnFocusChangeListener"
type="android.view.View.OnFocusChangeListener"></variable>
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="@dimen/all_padding"
android:src="@mipmap/login_logo"/>
android:src="@mipmap/login_logo" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/et_height"
android:layout_marginTop="@dimen/et_margin_logo">
<EditText
android:id="@+id/et_phone"
style="@style/editText_new"
......@@ -41,9 +41,8 @@
android:ems="10"
android:hint="@string/login_et_phone_hint"
android:inputType="phone"
android:maxLength="11"
/>
android:maxLength="11" />
<LinearLayout
android:id="@+id/ll_down"
android:layout_width="wrap_content"
......@@ -56,16 +55,16 @@
android:orientation="vertical"
android:paddingLeft="@dimen/et_padding"
android:paddingRight="@dimen/et_padding">
<ImageView
android:id="@+id/iv_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/createstore_drop_down"/>
android:src="@mipmap/createstore_drop_down" />
</LinearLayout>
</RelativeLayout>
<EditText
android:id="@+id/et_pwd"
style="@style/editText_new"
......@@ -76,49 +75,48 @@
android:ems="10"
android:hint="@string/login_et_password_hint"
android:inputType="textPassword"
android:maxLength="16"/>
android:maxLength="16" />
<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:layout_marginTop="@dimen/et_margin_logo"
android:layout_marginRight="@dimen/all_margin_left"
android:background="@drawable/red_border"
android:imeOptions="actionDone"
android:onClick="@{onClickListener}"
android:text="@string/login_signinfragmentfragment_btn_login"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
android:textSize="@dimen/et_textsize" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:layout_marginTop="@dimen/et_margin_logo">
android:layout_marginTop="@dimen/et_margin_logo"
android:layout_marginRight="@dimen/all_margin_left">
<TextView
android:id="@+id/tv_signUp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="@{onClickListener}"
android:text="注册 >"
android:textColor="@color/black_baozheng"
/>
android:text="@string/login_sign_up"
android:textColor="@color/black_baozheng" />
<TextView
android:id="@+id/tv_forgotPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:onClick="@{onClickListener}"
android:text="忘记密码 ?"
android:textColor="@color/black_baozheng"/>
android:text="@string/login_forget_password"
android:textColor="@color/black_baozheng" />
</RelativeLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="onClickListener"
type="android.view.View.OnClickListener"/>
type="android.view.View.OnClickListener" />
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
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">
<ImageView
android:id="@+id/iv_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/login_logo"/>
android:src="@mipmap/login_logo" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/et_height"
android:layout_marginTop="@dimen/et_margin_logo">
<EditText
android:id="@+id/et_phone"
style="@style/editText_new"
......@@ -46,9 +46,9 @@
android:gravity="center_vertical"
android:hint="@string/login_et_phone_hint"
android:inputType="phone|number"
android:maxLength="11"/>
android:maxLength="11" />
<LinearLayout
android:layout_width="@dimen/smscodefragment_drop_get_sms_width"
android:layout_height="wrap_content"
......@@ -56,27 +56,27 @@
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/all_margin_left"
android:orientation="horizontal">
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@mipmap/line"></View>
<TextView
android:id="@+id/tv_getsms"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:onClick="@{onClickListener}"
android:paddingBottom="@dimen/et_padding"
android:paddingTop="@dimen/et_padding"
android:paddingBottom="@dimen/et_padding"
android:text="@string/login_smscodefragment_tv_get_sms"
android:textColor="@color/black_baozheng"/>
android:textColor="@color/black_baozheng" />
</LinearLayout>
</RelativeLayout>
<EditText
android:id="@+id/et_sms_code"
style="@style/editText_new"
......@@ -87,23 +87,21 @@
android:ems="10"
android:hint="@string/login_smscodefragment_et_input_sms_hint"
android:inputType="phone|number"
android:maxLength="11"
/>
android:maxLength="11" />
<Button
android:id="@+id/btn_next"
style="@style/button"
android:layout_marginTop="@dimen/et_margin_logo"
android:onClick="@{onClickListener}"
android:text="@string/login_smscodefragment_btn_next"
/>
android:text="@string/login_smscodefragment_btn_next" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/et_margin_logo">
<TextView
android:id="@+id/tv_existing_account"
android:layout_width="wrap_content"
......@@ -111,10 +109,10 @@
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/all_margin_left"
android:onClick="@{onClickListener}"
android:text="已有账号 >"
android:textColor="@color/black_baozheng"/>
android:text="@string/login_back_login"
android:textColor="@color/black_baozheng" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_padding"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
android:paddingBottom="@dimen/all_padding">
<TextView
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="4"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_count"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_count"
android:layout_width="0dp"
android:id="@+id/tv_amt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintLeft_toRightOf="@+id/tv_name"
app:layout_constraintRight_toLeftOf="@+id/tv_price"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toBottomOf="@id/tv_price"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/tv_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_padding"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="@id/tv_price"
app:layout_constraintStart_toEndOf="@+id/tv_price"
app:layout_constraintTop_toTopOf="@id/tv_price" />
<TextView
android:id="@+id/tv_initial_price"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/gray"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/tv_price"
app:layout_constraintLeft_toRightOf="@+id/tv_count"
app:layout_constraintRight_toLeftOf="@+id/tv_amt"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
app:layout_constraintBottom_toBottomOf="@id/tv_price"
app:layout_constraintStart_toStartOf="@id/tv_name"
app:layout_constraintTop_toTopOf="@id/tv_price" />
<TextView
android:id="@+id/tv_price"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:layout_marginStart="@dimen/all_padding"
android:layout_marginTop="@dimen/all_spacing"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintLeft_toRightOf="@+id/tv_count"
app:layout_constraintRight_toLeftOf="@+id/tv_amt"
app:layout_constraintTop_toBottomOf="@id/tv_initial_price" />
<TextView
android:id="@+id/tv_amt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintLeft_toRightOf="@+id/tv_price"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintStart_toEndOf="@id/tv_initial_price"
app:layout_constraintTop_toBottomOf="@id/tv_name"
app:layout_goneMarginStart="0dp" />
</android.support.constraint.ConstraintLayout>
</layout>
......
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:layout_marginEnd="@dimen/all_margin"
android:background="@color/gray_kongming" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:gravity="center_vertical"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
android:paddingStart="@dimen/all_margin"
android:paddingEnd="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
......@@ -31,25 +31,7 @@
android:text="@string/cart_product_name"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="end"
android:text="@string/cart_product_count"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="end"
android:text="@string/cart_product_price"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
......@@ -58,15 +40,15 @@
android:text="@string/cart_product_amt"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:layout_marginEnd="@dimen/all_margin"
android:background="@color/gray_kongming" />
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -18,8 +18,12 @@
<string name="password"></string>
<string name="rate">%</string>
<string name="all_hint_date">日期不符合区间</string>
<string name="all_continue">继续</string>
<string name="all_ignore">忽略</string>
<string name="all_reboot">重启</string>
<!--返回-->
<string name="all_go_back">返回</string>
......@@ -39,7 +43,7 @@
<string name="login_phone_hint">手机</string>
<string name="login_password_hint">密码</string>
<string name="login_sign_in">登录</string>
<string name="login_forget_password">忘记密码</string>
<string name="login_forget_password">忘记密码 ? </string>
<string name="login_sign_up">注册</string>
<!--启动页面 <WHERE>_<DESCRIPTION>-->
<string name="splash_info">\@2017浙星提供云计算服务</string>
......
<resources>
<string name="login_back_login">返回登陆页面</string>
<string name="login_vya">验证账号</string>
</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