Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TangKuPos
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王海
TangKuPos
Commits
e4258168
Commit
e4258168
authored
Dec 21, 2017
by
zhang_z
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款页面;
parent
ef7e8cfc
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
251 additions
and
137 deletions
+251
-137
app/src/main/java/com/xingdata/zzdpos/ui/payment/fragment/PaymentFragment.java
.../xingdata/zzdpos/ui/payment/fragment/PaymentFragment.java
+3
-2
app/src/main/java/com/xingdata/zzdpos/ui/payment/view/CalculatorView.java
...a/com/xingdata/zzdpos/ui/payment/view/CalculatorView.java
+3
-3
app/src/main/res/layout/activity_payment.xml
app/src/main/res/layout/activity_payment.xml
+24
-5
app/src/main/res/layout/fragment_payment.xml
app/src/main/res/layout/fragment_payment.xml
+49
-14
app/src/main/res/layout/view_calculator.xml
app/src/main/res/layout/view_calculator.xml
+168
-113
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+4
-0
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/payment/fragment/PaymentFragment.java
View file @
e4258168
...
...
@@ -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
));
...
...
app/src/main/java/com/xingdata/zzdpos/ui/payment/view/CalculatorView.java
View file @
e4258168
...
...
@@ -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
:
...
...
app/src/main/res/layout/activity_payment.xml
View file @
e4258168
...
...
@@ -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"
...
...
app/src/main/res/layout/fragment_payment.xml
View file @
e4258168
<?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"
>
<
Linear
Layout
<
android.support.constraint.Constraint
Layout
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"
...
...
app/src/main/res/layout/view_calculator.xml
View file @
e4258168
This diff is collapsed.
Click to expand it.
app/src/main/res/values/strings.xml
View file @
e4258168
...
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment