Commit e4258168 authored by zhang_z's avatar zhang_z

收款页面;

parent ef7e8cfc
......@@ -22,9 +22,10 @@ public class PaymentFragment extends BaseFragment<PaymentPresenter, FragmentPaym
loadRootFragment(R.id.f_inputer, mCalculatorView);
mCalculatorView.setOnResultChangeListener((exp, result) -> {
LogUtils.e(exp + "\n" + result);
mViewBinding.tvExp.setText(exp);
mViewBinding.tvResult.setText(ConvertUtil.fenToYuan(result));
String strResult = ConvertUtil.fenToYuan(result);
mViewBinding.tvResult.setText(strResult);
mViewBinding.tvAmt.setText(strResult);
});
mCalculatorView.setOnSettleClickListener(result -> {
LogUtils.e(ConvertUtil.fenToYuan(result));
......
......@@ -48,13 +48,13 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
public void initView() {
View.OnClickListener mOnClickListener = view -> {
switch (view.getId()) {
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:
......
......@@ -6,12 +6,31 @@
android:layout_height="match_parent"
android:orientation="vertical">
<Toolbar
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/store_product_bg"
android:title="收款"
android:titleTextColor="@color/white" />
android:layout_height="?attr/actionBarSize"
android:background="@color/black_zhangfei">
<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" />
<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" />
</FrameLayout>
<FrameLayout
android:id="@+id/f_payment"
......
<?xml version="1.0" encoding="utf-8"?>
<layout>
<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">
<LinearLayout
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/store_product_bg"
android:orientation="vertical">
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:textColor="@color/white_caocao" />
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="match_parent"
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" />
</LinearLayout>
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"
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:text="小计:" />
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:text="40.00"
android:textColor="@color/deep_red" />
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"
......
This diff is collapsed.
......@@ -489,5 +489,9 @@
<string name="inputer_mul">×</string>
<string name="inputer_div">÷</string>
<!--收款-->
<string name="payment_title">收款</string>
<string name="payment_total">总计:</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