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
02bc82e6
Commit
02bc82e6
authored
Dec 26, 2017
by
zhang_z
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码;
parent
2816d114
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
553 additions
and
29 deletions
+553
-29
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+4
-0
app/src/main/java/com/xingdata/zzdpos/base/BaseDialog.java
app/src/main/java/com/xingdata/zzdpos/base/BaseDialog.java
+7
-11
app/src/main/java/com/xingdata/zzdpos/base/BaseSheetDialog.java
...c/main/java/com/xingdata/zzdpos/base/BaseSheetDialog.java
+58
-0
app/src/main/java/com/xingdata/zzdpos/db/DBFactory.java
app/src/main/java/com/xingdata/zzdpos/db/DBFactory.java
+4
-4
app/src/main/java/com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
.../com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
+5
-9
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreActivity.java
...main/java/com/xingdata/zzdpos/ui/store/StoreActivity.java
+42
-0
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreContract.java
...main/java/com/xingdata/zzdpos/ui/store/StoreContract.java
+14
-1
app/src/main/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
...ain/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
+41
-0
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/ScanFragment.java
...a/com/xingdata/zzdpos/ui/store/fragment/ScanFragment.java
+19
-0
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/SearchFragment.java
...com/xingdata/zzdpos/ui/store/fragment/SearchFragment.java
+18
-0
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/StoreFragment.java
.../com/xingdata/zzdpos/ui/store/fragment/StoreFragment.java
+21
-0
app/src/main/res/drawable/shape_white_oval.xml
app/src/main/res/drawable/shape_white_oval.xml
+7
-0
app/src/main/res/layout/activity_settle.xml
app/src/main/res/layout/activity_settle.xml
+1
-0
app/src/main/res/layout/activity_store.xml
app/src/main/res/layout/activity_store.xml
+260
-0
app/src/main/res/layout/fragment_casher.xml
app/src/main/res/layout/fragment_casher.xml
+1
-1
app/src/main/res/layout/fragment_settle.xml
app/src/main/res/layout/fragment_settle.xml
+3
-3
app/src/main/res/layout/fragment_store.xml
app/src/main/res/layout/fragment_store.xml
+12
-0
app/src/main/res/layout/fragment_store_scan.xml
app/src/main/res/layout/fragment_store_scan.xml
+13
-0
app/src/main/res/layout/fragment_store_search.xml
app/src/main/res/layout/fragment_store_search.xml
+12
-0
app/src/main/res/mipmap-xhdpi/shopping_cart.png
app/src/main/res/mipmap-xhdpi/shopping_cart.png
+0
-0
app/src/main/res/mipmap-xxhdpi/shopping_cart.png
app/src/main/res/mipmap-xxhdpi/shopping_cart.png
+0
-0
app/src/main/res/mipmap-xxxhdpi/shopping_cart.png
app/src/main/res/mipmap-xxxhdpi/shopping_cart.png
+0
-0
app/src/main/res/values/dimens.xml
app/src/main/res/values/dimens.xml
+4
-0
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+7
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
02bc82e6
...
...
@@ -66,6 +66,10 @@
android:name=
".ui.settle.SettleActivity"
android:configChanges=
"keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode=
"adjustUnspecified|stateHidden"
/>
<activity
android:name=
".ui.store.StoreActivity"
android:configChanges=
"keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode=
"adjustUnspecified|stateHidden"
/>
<activity
android:name=
".ui.announcement.AnnouncementActivity"
android:configChanges=
"keyboard|orientation|screenSize|keyboardHidden"
...
...
app/src/main/java/com/xingdata/zzdpos/base/BaseDialog.java
View file @
02bc82e6
...
...
@@ -6,15 +6,14 @@ import android.databinding.DataBindingUtil;
import
android.databinding.ViewDataBinding
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.v4.app.DialogFragment
;
import
android.support.v7.app.AppCompatDelegate
;
import
android.support.v7.app.AppCompatDialogFragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.KeyboardUtils
;
import
com.blankj.utilcode.util.LogUtils
;
import
com.blankj.utilcode.util.ScreenUtils
;
...
...
@@ -32,7 +31,7 @@ import io.reactivex.functions.Consumer;
import
io.reactivex.functions.Function
;
public
abstract
class
BaseDialog
<
P
extends
BasePresenter
,
B
extends
ViewDataBinding
>
extends
DialogFragment
{
public
abstract
class
BaseDialog
<
P
extends
BasePresenter
,
B
extends
ViewDataBinding
>
extends
AppCompat
DialogFragment
{
private
DialogBaseBinding
mBaseBinding
;
private
Disposable
mDisp
;
...
...
@@ -48,6 +47,9 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
public
abstract
int
getLayoutId
();
public
BaseDialog
()
{
mContext
=
getActivity
();
}
public
void
onCancelClick
(
View
view
)
{
KeyboardUtils
.
hideSoftInput
(
mViewBinding
.
getRoot
());
...
...
@@ -73,17 +75,13 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
mBaseBinding
.
btnConfirm
.
setEnabled
(
isEnable
);
}
public
int
getTitle
()
{
return
R
.
string
.
all_dialog
;
}
@Override
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
getDialog
().
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
mContext
=
ActivityUtils
.
getTopActivity
();
mPresenter
=
(
P
)
getBaseActivity
().
mPresenter
;
getBaseActivity
().
mDialogs
.
add
(
0
,
this
);
...
...
@@ -115,14 +113,12 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
private
View
getEasyFragmentDialog
(
@NonNull
LayoutInflater
inflater
,
ViewGroup
container
)
{
mViewBinding
=
DataBindingUtil
.
inflate
(
inflater
,
getLayoutId
(),
container
,
false
);
this
.
initView
();
return
mViewBinding
.
getRoot
();
}
pr
ivate
BaseActivity
getBaseActivity
()
{
pr
otected
BaseActivity
getBaseActivity
()
{
return
(
BaseActivity
)
getActivity
();
}
...
...
app/src/main/java/com/xingdata/zzdpos/base/BaseSheetDialog.java
0 → 100644
View file @
02bc82e6
package
com
.
xingdata
.
zzdpos
.
base
;
import
android.app.Dialog
;
import
android.content.Context
;
import
android.databinding.DataBindingUtil
;
import
android.databinding.ViewDataBinding
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.design.widget.BottomSheetBehavior
;
import
android.support.design.widget.BottomSheetDialog
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.WindowManager
;
public
abstract
class
BaseSheetDialog
<
P
extends
BasePresenter
,
B
extends
ViewDataBinding
>
extends
BaseDialog
<
P
,
B
>
{
public
BottomSheetBehavior
mBehavior
;
@NonNull
@Override
public
Dialog
onCreateDialog
(
Bundle
savedInstanceState
)
{
mContext
=
getActivity
();
mPresenter
=
(
P
)
getBaseActivity
().
mPresenter
;
getBaseActivity
().
mDialogs
.
add
(
0
,
this
);
MyBottomSheetDialog
dialog
=
new
MyBottomSheetDialog
(
mContext
);
mViewBinding
=
DataBindingUtil
.
inflate
(
LayoutInflater
.
from
(
mContext
),
getLayoutId
(),
null
,
false
);
dialog
.
setContentView
(
mViewBinding
.
getRoot
());
mBehavior
=
BottomSheetBehavior
.
from
((
View
)
mViewBinding
.
getRoot
().
getParent
());
this
.
initView
();
return
dialog
;
}
@Override
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
return
null
;
}
private
class
MyBottomSheetDialog
extends
BottomSheetDialog
{
public
MyBottomSheetDialog
(
@NonNull
Context
context
)
{
super
(
context
);
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
int
screenHeight
=
getScreenHeight
(
getContext
());
getWindow
().
setLayout
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
screenHeight
==
0
?
ViewGroup
.
LayoutParams
.
MATCH_PARENT
:
screenHeight
);
}
int
getScreenHeight
(
Context
context
)
{
WindowManager
wm
=
(
WindowManager
)
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
);
return
wm
!=
null
?
wm
.
getDefaultDisplay
().
getHeight
()
:
0
;
}
}
}
app/src/main/java/com/xingdata/zzdpos/db/DBFactory.java
View file @
02bc82e6
...
...
@@ -23,8 +23,6 @@ import io.realm.Sort;
public
class
DBFactory
{
public
static
class
Main
{
/**
* 查询交班记录
*/
...
...
@@ -35,7 +33,6 @@ public class DBFactory {
.
findFirst
();
}
/**
* 更改交班记录
*/
...
...
@@ -46,10 +43,13 @@ public class DBFactory {
realm
.
copyToRealmOrUpdate
(
handoverInfo
);
}
});
}
}
public
static
class
Store
{
}
public
static
class
Settle
{
/**
* 查询支付渠道
...
...
app/src/main/java/com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
View file @
02bc82e6
package
com
.
xingdata
.
zzdpos
.
ui
.
main
.
fragment
;
import
android.content.Intent
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.view.View
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.xingdata.zzdpos.C
;
...
...
@@ -16,10 +12,10 @@ import com.xingdata.zzdpos.base.BaseFragment;
import
com.xingdata.zzdpos.databinding.FragmentCasherBinding
;
import
com.xingdata.zzdpos.ui.main.MainPresenter
;
import
com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter
;
import
com.xingdata.zzdpos.ui.vip.VipActivity
;
import
com.xingdata.zzdpos.ui.payment.PaymentActivity
;
import
com.xingdata.zzdpos.ui.splash.SplashActivity
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsActivity
;
import
com.xingdata.zzdpos.ui.store.StoreActivity
;
import
com.xingdata.zzdpos.ui.vip.VipActivity
;
import
com.xingdata.zzdpos.util.MyMenuItemDecoration
;
import
com.xingdata.zzdpos.util.OnClickListener
;
...
...
@@ -55,7 +51,7 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
switch
((
int
)
adapter
.
getData
().
get
(
position
))
{
case
C
.
MENU
.
MENU_VIP
:
//会员
ActivityUtils
.
startActivity
(
new
Intent
(
getActivity
(),
VipActivity
.
class
));
ActivityUtils
.
startActivity
(
new
Intent
(
getActivity
(),
VipActivity
.
class
));
break
;
case
C
.
MENU
.
MENU_RECHARGE
:
//充值
...
...
@@ -82,10 +78,10 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
ActivityUtils
.
startActivity
(
getActivity
(),
PaymentActivity
.
class
);
}
});
mViewBinding
.
tvS
plash
.
setOnClickListener
(
new
OnClickListener
()
{
mViewBinding
.
tvS
tore
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
ActivityUtils
.
startActivity
(
getActivity
(),
S
plash
Activity
.
class
);
ActivityUtils
.
startActivity
(
getActivity
(),
S
tore
Activity
.
class
);
}
});
mViewBinding
.
btnHandover
.
setOnClickListener
(
new
OnClickListener
()
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreActivity.java
0 → 100644
View file @
02bc82e6
package
com
.
xingdata
.
zzdpos
.
ui
.
store
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseSheetDialog
;
import
com.xingdata.zzdpos.databinding.ActivityStoreBinding
;
import
com.xingdata.zzdpos.databinding.DialogPromptBinding
;
public
class
StoreActivity
extends
BaseActivity
<
StorePresenter
,
ActivityStoreBinding
>
implements
StoreContract
.
View
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_store
;
}
@Override
public
void
initView
()
{
mViewBinding
.
tvSettle
.
setOnClickListener
(
view
->
{
mViewBinding
.
setMsDisAmt
(
mViewBinding
.
getMsDisAmt
()
>
0
?
0
:
10000
);
});
mViewBinding
.
ivCart
.
setOnClickListener
(
view
->
{
new
FullSheetDialogFragment
().
show
(
getSupportFragmentManager
(),
"dialog"
);
});
}
public
static
class
FullSheetDialogFragment
extends
BaseSheetDialog
<
StorePresenter
,
DialogPromptBinding
>
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
dialog_prompt
;
}
@Override
public
void
initView
()
{
mViewBinding
.
btnCustom
.
setOnClickListener
(
view
->
{
mPresenter
.
clickSettle
();
});
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreContract.java
View file @
02bc82e6
...
...
@@ -12,7 +12,20 @@ interface StoreContract {
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
/**
* 点击结算按钮
*/
public
abstract
void
clickSettle
();
/**
* 点击搜索
*/
public
abstract
void
clickSearch
(
String
keyword
);
/**
* 点击购物车logo
*/
public
abstract
void
clickCartLogo
();
}
}
app/src/main/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
0 → 100644
View file @
02bc82e6
package
com
.
xingdata
.
zzdpos
.
ui
.
store
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.model.Saledetail
;
import
java.util.List
;
public
class
StorePresenter
extends
StoreContract
.
Presenter
{
/**
* 当前购物车信息
*/
private
List
<
Saledetail
>
mSaledetails
;
/**
* 当前营销计划
*/
private
List
<
Ms
>
mMss
;
@Override
public
void
onAttached
()
{
this
.
initRealm
();
}
@Override
public
void
clickSettle
()
{
//TODO 带上mSaleorder跳转到Settle界面
}
@Override
public
void
clickSearch
(
String
keyword
)
{
//TODO 搜索出结果后显示SearchFragment
}
@Override
public
void
clickCartLogo
()
{
//TODO 显示购物车
}
}
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/ScanFragment.java
0 → 100644
View file @
02bc82e6
package
com
.
xingdata
.
zzdpos
.
ui
.
store
.
fragment
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentStoreScanBinding
;
import
com.xingdata.zzdpos.ui.store.StorePresenter
;
public
class
ScanFragment
extends
BaseFragment
<
StorePresenter
,
FragmentStoreScanBinding
>
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_store_scan
;
}
@Override
public
void
initView
()
{
}
}
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/SearchFragment.java
0 → 100644
View file @
02bc82e6
package
com
.
xingdata
.
zzdpos
.
ui
.
store
.
fragment
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentStoreSearchBinding
;
import
com.xingdata.zzdpos.ui.store.StorePresenter
;
public
class
SearchFragment
extends
BaseFragment
<
StorePresenter
,
FragmentStoreSearchBinding
>
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_store_search
;
}
@Override
public
void
initView
()
{
}
}
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/StoreFragment.java
0 → 100644
View file @
02bc82e6
package
com
.
xingdata
.
zzdpos
.
ui
.
store
.
fragment
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentStoreBinding
;
import
com.xingdata.zzdpos.ui.store.StorePresenter
;
public
class
StoreFragment
extends
BaseFragment
<
StorePresenter
,
FragmentStoreBinding
>
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_store_search
;
}
@Override
public
void
initView
()
{
}
}
app/src/main/res/drawable/shape_white_oval.xml
0 → 100644
View file @
02bc82e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"oval"
>
<solid
android:color=
"@color/white_caocao"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_settle.xml
View file @
02bc82e6
...
...
@@ -48,6 +48,7 @@
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:inputType=
"number"
android:labelFor=
"@+id/et_search"
android:textColor=
"@color/black_likui"
android:textColorHint=
"@color/gray_huanggai"
android:textSize=
"@dimen/all_text_size"
/>
...
...
app/src/main/res/layout/activity_store.xml
0 → 100644
View file @
02bc82e6
<?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"
xmlns:tools=
"http://schemas.android.com/tools"
>
<data>
<import
type=
"android.view.View"
/>
<import
type=
"com.xingdata.zzdpos.util.ConvertUtil"
/>
<variable
name=
"cartCount"
type=
"int"
/>
<variable
name=
"orderPayAmt"
type=
"long"
/>
<variable
name=
"msDisAmt"
type=
"long"
/>
</data>
<android.support.constraint.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/cl_title"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:animateLayoutChanges=
"true"
android:background=
"@color/white_caocao"
app:layout_constraintBottom_toTopOf=
"@id/f_store"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageButton
android:id=
"@+id/btn_back"
android:layout_width=
"@dimen/title_height"
android:layout_height=
"match_parent"
android:background=
"?attr/actionBarItemBackground"
android:contentDescription=
"@string/all_go_back"
android:gravity=
"center"
android:padding=
"@dimen/all_margin"
android:src=
"@mipmap/back_black"
app:layout_constraintLeft_toLeftOf=
"parent"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginEnd=
"@dimen/all_spacing"
app:layout_constraintBottom_toTopOf=
"parent"
app:layout_constraintLeft_toRightOf=
"@id/btn_back"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"parent"
>
<EditText
android:id=
"@+id/et_search"
style=
"@style/searchBarEditor"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginEnd=
"@dimen/all_spacing"
android:layout_weight=
"1"
android:inputType=
"number"
android:labelFor=
"@+id/et_search"
android:textColor=
"@color/black_likui"
android:textColorHint=
"@color/gray_huanggai"
android:textSize=
"@dimen/all_text_size"
/>
<ImageButton
android:id=
"@+id/btn_scan"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/transparent"
android:contentDescription=
"@string/store_scan"
android:foreground=
"?android:attr/actionBarItemBackground"
android:src=
"@mipmap/but_sweep_yard"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_gravity=
"bottom"
android:background=
"@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
<FrameLayout
android:id=
"@+id/f_store"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:background=
"@color/red_xishi"
app:layout_constraintBottom_toTopOf=
"@id/fl_cart"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/cl_title"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
app:layout_constraintBottom_toTopOf=
"@id/fl_cart"
/>
<FrameLayout
android:id=
"@+id/fl_cart"
android:layout_width=
"0dp"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
<FrameLayout
android:id=
"@+id/fl_ms"
android:layout_width=
"0dp"
android:layout_height=
"28dp"
android:alpha=
"0.87"
android:background=
"@color/cyan_sunquan"
android:gravity=
"center_vertical"
android:visibility=
"@{msDisAmt>0?View.VISIBLE:View.GONE}"
app:layout_constraintBottom_toTopOf=
"@id/fl_cart"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_spacing"
android:visibility=
"@{msDisAmt>0?View.VISIBLE:View.GONE}"
app:layout_constraintBottom_toTopOf=
"@id/fl_ms"
app:layout_constraintLeft_toRightOf=
"@id/fl_logo"
app:layout_constraintTop_toBottomOf=
"@id/fl_ms"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/all_line_width"
android:paddingBottom=
"@dimen/all_spacing"
android:paddingTop=
"@dimen/all_spacing"
android:text=
"@string/store_ms_dis"
android:textColor=
"@color/black_zhangfei"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/all_line_width"
android:text=
"@{ConvertUtil.fenToYuan(msDisAmt)}"
android:textColor=
"@color/red_guanyu"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/all_line_width"
android:paddingBottom=
"@dimen/all_spacing"
android:paddingTop=
"@dimen/all_spacing"
android:text=
"@string/unit_rmb_yuan"
android:textColor=
"@color/black_zhangfei"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_spacing"
android:animateLayoutChanges=
"true"
app:layout_constraintBottom_toTopOf=
"@id/fl_cart"
app:layout_constraintLeft_toRightOf=
"@id/fl_logo"
app:layout_constraintTop_toBottomOf=
"@id/fl_cart"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/store_pay_amt"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_spacing"
android:text=
"@string/money_rmb"
android:textColor=
"@color/red_guanyu"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"@{ConvertUtil.fenToYuan(orderPayAmt)}"
android:textColor=
"@color/red_guanyu"
android:textSize=
"@dimen/all_sub_title_size"
android:textStyle=
"bold"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_settle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_margin"
android:background=
"@drawable/shape_red_round_rectangle_more_round"
android:foreground=
"?android:attr/actionBarItemBackground"
android:paddingBottom=
"@dimen/all_spacing"
android:paddingEnd=
"@dimen/all_margin_big"
android:paddingStart=
"@dimen/all_margin_big"
android:paddingTop=
"@dimen/all_spacing"
android:text=
"@string/store_btn_settle"
android:textColor=
"@color/white_caocao"
app:layout_constraintBottom_toTopOf=
"@id/fl_cart"
app:layout_constraintRight_toRightOf=
"@id/fl_cart"
app:layout_constraintTop_toBottomOf=
"@id/fl_cart"
/>
<FrameLayout
android:id=
"@+id/fl_logo"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_margin_big"
android:animateLayoutChanges=
"true"
app:layout_constraintBottom_toBottomOf=
"@id/tv_settle"
app:layout_constraintLeft_toLeftOf=
"@id/fl_cart"
>
<ImageView
android:id=
"@+id/iv_cart"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_spacing"
android:contentDescription=
"@string/store_cart"
android:foreground=
"?attr/actionBarItemBackground"
android:src=
"@mipmap/shopping_cart"
/>
<TextView
android:layout_width=
"@dimen/store_cart_count"
android:layout_height=
"@dimen/store_cart_count"
android:layout_gravity=
"end"
android:background=
"@drawable/shape_white_oval"
android:gravity=
"center"
android:text=
'@{cartCount+""}'
android:textColor=
"@color/red_guanyu"
android:textSize=
"@{cartCount < 100?@dimen/all_caption_size:@dimen/all_tiny_size}"
android:textStyle=
"bold"
android:visibility=
"@{cartCount>0?View.VISIBLE:View.GONE}"
/>
</FrameLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_casher.xml
View file @
02bc82e6
...
...
@@ -41,7 +41,7 @@
android:textColor=
"#FFF"
/>
<TextView
android:id=
"@+id/tv_s
plash
"
android:id=
"@+id/tv_s
tore
"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
...
...
app/src/main/res/layout/fragment_settle.xml
View file @
02bc82e6
...
...
@@ -61,7 +61,7 @@
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
>
<ScrollView
<
android.support.v4.widget.Nested
ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
...
...
@@ -351,7 +351,7 @@
</LinearLayout>
</ScrollView>
</
android.support.v4.widget.Nested
ScrollView>
<LinearLayout
android:id=
"@+id/ll_sheet"
...
...
@@ -403,7 +403,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_red_round_rectangle_more_round"
android:foreground=
"?android:attr/
selectableItemBackgroundBorderless
"
android:foreground=
"?android:attr/
actionBarItemBackground
"
android:paddingBottom=
"@dimen/all_spacing"
android:paddingEnd=
"@dimen/all_margin_big"
android:paddingStart=
"@dimen/all_margin_big"
...
...
app/src/main/res/layout/fragment_store.xml
0 → 100644
View file @
02bc82e6
<?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.design.widget.CoordinatorLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
>
</android.support.design.widget.CoordinatorLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_store_scan.xml
0 → 100644
View file @
02bc82e6
<?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.design.widget.CoordinatorLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
>
</android.support.design.widget.CoordinatorLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_store_search.xml
0 → 100644
View file @
02bc82e6
<?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.design.widget.CoordinatorLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
>
</android.support.design.widget.CoordinatorLayout>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/shopping_cart.png
0 → 100644
View file @
02bc82e6
3.25 KB
app/src/main/res/mipmap-xxhdpi/shopping_cart.png
0 → 100644
View file @
02bc82e6
4.24 KB
app/src/main/res/mipmap-xxxhdpi/shopping_cart.png
0 → 100644
View file @
02bc82e6
5.72 KB
app/src/main/res/values/dimens.xml
View file @
02bc82e6
...
...
@@ -11,6 +11,7 @@
<dimen
name=
"all_text_size"
>
16sp
</dimen>
<dimen
name=
"all_text_size_small"
>
12sp
</dimen>
<dimen
name=
"all_caption_size"
>
12sp
</dimen>
<dimen
name=
"all_tiny_size"
>
9sp
</dimen>
<dimen
name=
"all_title_size"
>
26sp
</dimen>
<dimen
name=
"all_padding"
>
10dp
</dimen>
<dimen
name=
"all_text_size_big"
>
22sp
</dimen>
...
...
@@ -191,5 +192,8 @@
<dimen
name=
"settle_pay_item"
>
108dp
</dimen>
<dimen
name=
"settle_pay_logo"
>
72dp
</dimen>
<!--商店-->
<dimen
name=
"store_cart_count"
>
20dp
</dimen>
</resources>
app/src/main/res/values/strings.xml
View file @
02bc82e6
...
...
@@ -532,6 +532,13 @@
<string
name=
"settle_ticket_unit"
>
张
</string>
<string
name=
"settle_ticket_info"
>
元优惠券
</string>
<!--商店-->
<string
name=
"store_pay_amt"
>
合计:
</string>
<string
name=
"store_cart"
>
购物车
</string>
<string
name=
"store_btn_settle"
>
选好了
</string>
<string
name=
"store_ms_dis"
>
已减
</string>
<string
name=
"store_scan"
>
扫描
</string>
<!--帮助POS-->
<string
name=
"help_hint"
>
帮助
</string>
<string
name=
"help_phone"
>
400–800–9406
</string>
...
...
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