Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FacePay
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘立
FacePay
Commits
dd9e6149
Commit
dd9e6149
authored
Aug 14, 2018
by
llxqb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购物车界面-部分
parent
31d317a1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
400 additions
and
36 deletions
+400
-36
app/src/main/java/com/freemud/app/facepay/MainActivity.java
+11
-2
app/src/main/java/com/freemud/app/facepay/views/CommonDialog.java
+75
-0
app/src/main/java/com/freemud/app/facepay/views/LoginDialog.java
+93
-2
app/src/main/java/com/freemud/app/facepay/views/MainDialog.java
+94
-5
app/src/main/res/drawable/app_write_bg.xml
+1
-1
app/src/main/res/layout/dialog_common.xml
+51
-0
app/src/main/res/layout/dialog_login.xml
+10
-7
app/src/main/res/layout/dialog_main.xml
+13
-8
app/src/main/res/layout/dialog_shoppingcart_pay.xml
+29
-0
app/src/main/res/values/dimens.xml
+5
-3
app/src/main/res/values/strings.xml
+12
-8
app/src/main/res/values/styles.xml
+6
-0
No files found.
app/src/main/java/com/freemud/app/facepay/MainActivity.java
View file @
dd9e6149
...
...
@@ -26,6 +26,7 @@ import com.freemud.app.facepay.adapter.ShoppingBagAdapter;
import
com.freemud.app.facepay.entity.Goods
;
import
com.freemud.app.facepay.entity.ShoppingBag
;
import
com.freemud.app.facepay.help.DialogFactory
;
import
com.freemud.app.facepay.views.CommonDialog
;
import
com.freemud.app.facepay.views.CustomPopWindow
;
import
com.freemud.app.facepay.views.LoginDialog
;
import
com.freemud.app.facepay.views.MainDialog
;
...
...
@@ -33,7 +34,7 @@ import com.freemud.app.facepay.views.MainDialog;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
MainActivity
extends
AppCompatActivity
implements
MainDialog
.
MainDialogListener
{
public
class
MainActivity
extends
AppCompatActivity
implements
MainDialog
.
MainDialogListener
,
CommonDialog
.
CommonDialogListener
{
public
static
String
TAG
=
"MainActivity"
;
@Override
...
...
@@ -48,7 +49,10 @@ public class MainActivity extends AppCompatActivity implements MainDialog.MainDi
TextView
mMainHineTitle
=
findViewById
(
R
.
id
.
main_hint_title
);
TextView
mMainHineHands
=
findViewById
(
R
.
id
.
main_barcode_hands
);
mMainHineTitle
.
setOnClickListener
(
v
->
{
ShoppingCartActivity
.
start
(
MainActivity
.
this
);
// ShoppingCartActivity.start(MainActivity.this);
CommonDialog
commonDialog
=
CommonDialog
.
newInstance
();
commonDialog
.
setListener
(
MainActivity
.
this
);
DialogFactory
.
showDialogFragment
(
getSupportFragmentManager
(),
commonDialog
,
LoginDialog
.
TAG
);
});
mMainHineHands
.
setOnClickListener
(
v
->
{
MainDialog
mainDialog
=
MainDialog
.
newInstance
();
...
...
@@ -68,4 +72,9 @@ public class MainActivity extends AppCompatActivity implements MainDialog.MainDi
public
void
mainDialogBtnOkListener
(
boolean
mainFlag
)
{
}
@Override
public
void
commonDialogBtnOkListener
(
boolean
flag
)
{
ShoppingCartActivity
.
start
(
MainActivity
.
this
);
}
}
app/src/main/java/com/freemud/app/facepay/views/CommonDialog.java
0 → 100644
View file @
dd9e6149
package
com
.
freemud
.
app
.
facepay
.
views
;
import
android.os.Bundle
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
com.freemud.app.facepay.R
;
import
com.freemud.app.facepay.help.DialogFactory
;
/**
* 公用提示的dialog
*
* @author li
*/
public
class
CommonDialog
extends
BaseDialogFragment
{
public
static
final
String
TAG
=
CommonDialog
.
class
.
getSimpleName
();
private
CommonDialogListener
dialogBtnListener
;
// private int mActivityFlag;
public
static
CommonDialog
newInstance
()
{
return
new
CommonDialog
();
}
public
void
setListener
(
CommonDialogListener
dialogBtnListener
)
{
this
.
dialogBtnListener
=
dialogBtnListener
;
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
View
view
=
inflater
.
inflate
(
R
.
layout
.
dialog_common
,
container
,
true
);
LinearLayout
mDialogLayouyCommon
=
view
.
findViewById
(
R
.
id
.
dialog_layout_common
);
TextView
mCommonDialogTvSure
=
view
.
findViewById
(
R
.
id
.
common_dialog_tv_sure
);
mCommonDialogTvSure
.
setOnClickListener
(
this
);
mDialogLayouyCommon
.
setOnClickListener
(
this
);
return
view
;
}
@Override
public
void
onClick
(
View
v
)
{
switch
(
v
.
getId
())
{
case
R
.
id
.
dialog_layout_common
:
closeLoginDialog
();
break
;
case
R
.
id
.
common_dialog_tv_sure
:
toSure
();
break
;
}
}
private
boolean
toSure
()
{
if
(
dialogBtnListener
!=
null
)
{
closeLoginDialog
();
dialogBtnListener
.
commonDialogBtnOkListener
(
true
);
}
return
true
;
}
public
interface
CommonDialogListener
{
void
commonDialogBtnOkListener
(
boolean
flag
);
}
public
void
closeLoginDialog
()
{
try
{
this
.
dismiss
();
}
catch
(
Exception
e
)
{
DialogFactory
.
dismissDialogFragment
(
getActivity
().
getSupportFragmentManager
(),
TAG
);
}
}
}
app/src/main/java/com/freemud/app/facepay/views/LoginDialog.java
View file @
dd9e6149
package
com
.
freemud
.
app
.
facepay
.
views
;
import
android.graphics.drawable.Drawable
;
import
android.os.Bundle
;
import
android.support.constraint.ConstraintLayout
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.freemud.app.facepay.R
;
import
com.freemud.app.facepay.help.DialogFactory
;
...
...
@@ -20,6 +24,10 @@ import com.freemud.app.facepay.help.DialogFactory;
public
class
LoginDialog
extends
BaseDialogFragment
{
public
static
final
String
TAG
=
LoginDialog
.
class
.
getSimpleName
();
private
LoginDialogListener
dialogBtnListener
;
private
Button
[]
mButtons
=
null
;
private
TextView
mDialogTvCardNum
;
private
String
newValue
=
""
;
private
Button
mDialogBtnLogin
;
public
static
LoginDialog
newInstance
()
{
return
new
LoginDialog
();
...
...
@@ -34,14 +42,33 @@ public class LoginDialog extends BaseDialogFragment {
Bundle
savedInstanceState
)
{
View
view
=
inflater
.
inflate
(
R
.
layout
.
dialog_login
,
container
,
true
);
RelativeLayout
mDialogLayoutLogin
=
view
.
findViewById
(
R
.
id
.
dialog_layout_login
);
ConstraintLayout
mDialogClLogin
=
view
.
findViewById
(
R
.
id
.
dialog_cl_login
);
mDialogClLogin
.
setOnClickListener
(
this
);
LinearLayout
mDialogLiExit
=
view
.
findViewById
(
R
.
id
.
dialog_ll_exit
);
LinearLayout
mDialogLlNumDelete
=
view
.
findViewById
(
R
.
id
.
dialog_ll_num_delete
);
EditText
mDialogEtCardNum
=
view
.
findViewById
(
R
.
id
.
dialog_et_card_num
);
Button
mDialogBtnLogin
=
view
.
findViewById
(
R
.
id
.
dialog_btn_login
);
mDialogTvCardNum
=
view
.
findViewById
(
R
.
id
.
dialog_tv_card_num
);
ImageView
mDialogIvNumClear
=
view
.
findViewById
(
R
.
id
.
dialog_iv_num_clear
);
mDialogBtnLogin
=
view
.
findViewById
(
R
.
id
.
dialog_btn_login
);
mButtons
=
new
Button
[
10
];
mButtons
[
1
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_1
);
mButtons
[
2
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_2
);
mButtons
[
3
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_3
);
mButtons
[
4
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_4
);
mButtons
[
5
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_5
);
mButtons
[
6
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_6
);
mButtons
[
7
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_7
);
mButtons
[
8
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_8
);
mButtons
[
9
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_9
);
mButtons
[
0
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_0
);
for
(
int
i
=
0
;
i
<=
9
;
i
++)
{
mButtons
[
i
].
setOnClickListener
(
this
);
}
mDialogLayoutLogin
.
setOnClickListener
(
this
);
mDialogLiExit
.
setOnClickListener
(
this
);
mDialogLlNumDelete
.
setOnClickListener
(
this
);
mDialogIvNumClear
.
setOnClickListener
(
this
);
mDialogBtnLogin
.
setOnClickListener
(
this
);
return
view
;
}
...
...
@@ -55,12 +82,76 @@ public class LoginDialog extends BaseDialogFragment {
case
R
.
id
.
dialog_ll_exit
:
closeLoginDialog
();
break
;
case
R
.
id
.
dialog_ll_num_delete
:
deleteTvNumValue
();
break
;
case
R
.
id
.
dialog_iv_num_clear
:
clearTvNumValue
();
break
;
case
R
.
id
.
dialog_btn_num_0
:
addTvNumValue
(
"0"
);
break
;
case
R
.
id
.
dialog_btn_num_1
:
addTvNumValue
(
"1"
);
break
;
case
R
.
id
.
dialog_btn_num_2
:
addTvNumValue
(
"2"
);
break
;
case
R
.
id
.
dialog_btn_num_3
:
addTvNumValue
(
"3"
);
break
;
case
R
.
id
.
dialog_btn_num_4
:
addTvNumValue
(
"4"
);
break
;
case
R
.
id
.
dialog_btn_num_5
:
addTvNumValue
(
"5"
);
break
;
case
R
.
id
.
dialog_btn_num_6
:
addTvNumValue
(
"6"
);
break
;
case
R
.
id
.
dialog_btn_num_7
:
addTvNumValue
(
"7"
);
break
;
case
R
.
id
.
dialog_btn_num_8
:
addTvNumValue
(
"8"
);
break
;
case
R
.
id
.
dialog_btn_num_9
:
addTvNumValue
(
"9"
);
break
;
case
R
.
id
.
dialog_btn_login
:
toLogin
();
break
;
}
}
private
void
addTvNumValue
(
String
value
)
{
newValue
=
newValue
+
value
;
mDialogTvCardNum
.
setText
(
newValue
);
setBtnSureColor
();
}
private
void
deleteTvNumValue
()
{
if
(
newValue
!=
null
&&
!
newValue
.
equals
(
""
))
{
newValue
=
newValue
.
substring
(
0
,
newValue
.
length
()
-
1
);
mDialogTvCardNum
.
setText
(
newValue
);
}
setBtnSureColor
();
}
private
void
clearTvNumValue
()
{
newValue
=
""
;
mDialogTvCardNum
.
setText
(
newValue
);
setBtnSureColor
();
}
private
void
setBtnSureColor
()
{
if
(
newValue
.
equals
(
""
)
||
newValue
==
null
)
{
mDialogBtnLogin
.
setBackgroundResource
(
R
.
drawable
.
dialog_btn_login_normal
);
}
else
{
mDialogBtnLogin
.
setBackgroundResource
(
R
.
drawable
.
dialog_btn_login_bg
);
}
}
private
boolean
toLogin
()
{
if
(
dialogBtnListener
!=
null
)
{
closeLoginDialog
();
...
...
app/src/main/java/com/freemud/app/facepay/views/MainDialog.java
View file @
dd9e6149
package
com
.
freemud
.
app
.
facepay
.
views
;
import
android.os.Bundle
;
import
android.support.constraint.ConstraintLayout
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
com.freemud.app.facepay.R
;
import
com.freemud.app.facepay.help.DialogFactory
;
...
...
@@ -19,7 +22,10 @@ import com.freemud.app.facepay.help.DialogFactory;
public
class
MainDialog
extends
BaseDialogFragment
{
public
static
final
String
TAG
=
MainDialog
.
class
.
getSimpleName
();
private
MainDialogListener
dialogBtnListener
;
// private int mActivityFlag;
private
Button
[]
mButtons
=
null
;
private
String
newValue
=
""
;
private
TextView
mDialogTvCardNum
;
private
Button
mDialogBtnSure
;
public
static
MainDialog
newInstance
()
{
return
new
MainDialog
();
...
...
@@ -34,14 +40,33 @@ public class MainDialog extends BaseDialogFragment {
Bundle
savedInstanceState
)
{
View
view
=
inflater
.
inflate
(
R
.
layout
.
dialog_main
,
container
,
true
);
LinearLayout
mDialogLayouyMain
=
view
.
findViewById
(
R
.
id
.
dialog_layout_main
);
ConstraintLayout
mDialogClMain
=
view
.
findViewById
(
R
.
id
.
dialog_cl_main
);
mDialogClMain
.
setOnClickListener
(
this
);
LinearLayout
mDialogLiExit
=
view
.
findViewById
(
R
.
id
.
dialog_ll_exit
);
LinearLayout
mDialogLlNumDelete
=
view
.
findViewById
(
R
.
id
.
dialog_ll_num_delete
);
EditText
mDialogEtCardNum
=
view
.
findViewById
(
R
.
id
.
dialog_et_card_num
);
Button
mDialogBtnMain
=
view
.
findViewById
(
R
.
id
.
dialog_btn_main
);
ImageView
mDialogLlNumClear
=
view
.
findViewById
(
R
.
id
.
dialog_iv_num_clear
);
mDialogTvCardNum
=
view
.
findViewById
(
R
.
id
.
dialog_tv_card_num
);
mDialogBtnSure
=
view
.
findViewById
(
R
.
id
.
dialog_btn_sure
);
mButtons
=
new
Button
[
10
];
mButtons
[
1
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_1
);
mButtons
[
2
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_2
);
mButtons
[
3
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_3
);
mButtons
[
4
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_4
);
mButtons
[
5
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_5
);
mButtons
[
6
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_6
);
mButtons
[
7
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_7
);
mButtons
[
8
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_8
);
mButtons
[
9
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_9
);
mButtons
[
0
]
=
view
.
findViewById
(
R
.
id
.
dialog_btn_num_0
);
for
(
int
i
=
0
;
i
<=
9
;
i
++)
{
mButtons
[
i
].
setOnClickListener
(
this
);
}
mDialogLayouyMain
.
setOnClickListener
(
this
);
mDialogLiExit
.
setOnClickListener
(
this
);
mDialogLlNumDelete
.
setOnClickListener
(
this
);
mDialogBtnMain
.
setOnClickListener
(
this
);
mDialogLlNumClear
.
setOnClickListener
(
this
);
mDialogBtnSure
.
setOnClickListener
(
this
);
return
view
;
}
...
...
@@ -54,12 +79,76 @@ public class MainDialog extends BaseDialogFragment {
case
R
.
id
.
dialog_ll_exit
:
closeLoginDialog
();
break
;
case
R
.
id
.
dialog_btn_main
:
case
R
.
id
.
dialog_ll_num_delete
:
deleteTvNumValue
();
break
;
case
R
.
id
.
dialog_iv_num_clear
:
clearTvNumValue
();
break
;
case
R
.
id
.
dialog_btn_num_0
:
addTvNumValue
(
"0"
);
break
;
case
R
.
id
.
dialog_btn_num_1
:
addTvNumValue
(
"1"
);
break
;
case
R
.
id
.
dialog_btn_num_2
:
addTvNumValue
(
"2"
);
break
;
case
R
.
id
.
dialog_btn_num_3
:
addTvNumValue
(
"3"
);
break
;
case
R
.
id
.
dialog_btn_num_4
:
addTvNumValue
(
"4"
);
break
;
case
R
.
id
.
dialog_btn_num_5
:
addTvNumValue
(
"5"
);
break
;
case
R
.
id
.
dialog_btn_num_6
:
addTvNumValue
(
"6"
);
break
;
case
R
.
id
.
dialog_btn_num_7
:
addTvNumValue
(
"7"
);
break
;
case
R
.
id
.
dialog_btn_num_8
:
addTvNumValue
(
"8"
);
break
;
case
R
.
id
.
dialog_btn_num_9
:
addTvNumValue
(
"9"
);
break
;
case
R
.
id
.
dialog_btn_sure
:
toLogin
();
break
;
}
}
private
void
addTvNumValue
(
String
value
)
{
newValue
=
newValue
+
value
;
mDialogTvCardNum
.
setText
(
newValue
);
setBtnSureColor
();
}
private
void
deleteTvNumValue
()
{
if
(
newValue
!=
null
&&
!
newValue
.
equals
(
""
))
{
newValue
=
newValue
.
substring
(
0
,
newValue
.
length
()
-
1
);
mDialogTvCardNum
.
setText
(
newValue
);
}
setBtnSureColor
();
}
private
void
clearTvNumValue
()
{
newValue
=
""
;
mDialogTvCardNum
.
setText
(
newValue
);
setBtnSureColor
();
}
private
void
setBtnSureColor
()
{
if
(
newValue
.
equals
(
""
)
||
newValue
==
null
)
{
mDialogBtnSure
.
setBackgroundResource
(
R
.
drawable
.
dialog_btn_login_normal
);
}
else
{
mDialogBtnSure
.
setBackgroundResource
(
R
.
drawable
.
dialog_btn_login_bg
);
}
}
private
boolean
toLogin
()
{
if
(
dialogBtnListener
!=
null
)
{
closeLoginDialog
();
...
...
app/src/main/res/drawable/app_write_bg.xml
View file @
dd9e6149
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"
2
dp"
/>
<corners
android:radius=
"
4
dp"
/>
<solid
android:color=
"@color/write"
/>
<stroke
android:width=
"1dp"
...
...
app/src/main/res/layout/dialog_common.xml
0 → 100644
View file @
dd9e6149
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/dialog_layout_common"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:orientation=
"vertical"
android:background=
"#90000000"
>
<LinearLayout
android:layout_width=
"@dimen/height_460px"
android:layout_height=
"@dimen/height_300px"
android:background=
"@drawable/app_write_bg"
android:gravity=
"center"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/height_40px"
android:gravity=
"center_horizontal"
android:text=
"@string/common_dialog_no_find_shopping"
android:textColor=
"@color/black"
android:textSize=
"@dimen/sp_30px"
/>
<TextView
android:id=
"@+id/common_dialog_tv_barcode"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/height_18px"
android:text=
"@string/common_dialog_shopping_barcode"
android:textColor=
"@color/color888"
android:textSize=
"@dimen/sp_26px"
/>
<View
style=
"@style/line_height05"
android:layout_marginTop=
"@dimen/height_40px"
/>
<TextView
android:id=
"@+id/common_dialog_tv_sure"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/height_30px"
android:text=
"@string/common_dialog_shopping_sure"
android:textColor=
"@color/app_color"
android:textSize=
"@dimen/sp_30px"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/dialog_login.xml
View file @
dd9e6149
...
...
@@ -8,6 +8,7 @@
<android.support.constraint.ConstraintLayout
android:id=
"@+id/dialog_cl_login"
android:layout_width=
"@dimen/height_520px"
android:layout_height=
"@dimen/height_800px"
android:layout_centerInParent=
"true"
...
...
@@ -57,15 +58,17 @@
app:layout_constraintTop_toBottomOf=
"@id/dialog_tv_login"
/>
<
EditText
android:id=
"@+id/dialog_
et
_card_num"
<
TextView
android:id=
"@+id/dialog_
tv
_card_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/height_80px"
android:layout_marginStart=
"@dimen/height_80px"
android:layout_marginTop=
"@dimen/height_114px"
android:background=
"@null"
android:hint=
"@string/card_hint_login"
android:textSize=
"@dimen/sp_30px"
android:textColor=
"@color/black"
android:hint=
"@string/dialog_card_hint_login"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/dialog_tv_hint"
/>
...
...
@@ -77,7 +80,7 @@
android:layout_marginEnd=
"@dimen/height_30px"
android:layout_marginTop=
"@dimen/height_120px"
android:src=
"@drawable/delete_normal"
app:layout_constraintLeft_toRightOf=
"@id/dialog_
et
_card_num"
app:layout_constraintLeft_toRightOf=
"@id/dialog_
tv
_card_num"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/dialog_tv_hint"
/>
...
...
@@ -90,7 +93,7 @@
android:background=
"@color/color888"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/dialog_
et
_card_num"
/>
app:layout_constraintTop_toBottomOf=
"@id/dialog_
tv
_card_num"
/>
<TextView
...
...
@@ -100,7 +103,7 @@
android:layout_marginEnd=
"@dimen/height_80px"
android:layout_marginStart=
"@dimen/height_80px"
android:layout_marginTop=
"@dimen/height_14px"
android:text=
"@string/no_card_hint"
android:text=
"@string/
dialog_
no_card_hint"
android:textColor=
"@color/hint_red_color"
android:textSize=
"@dimen/sp_20px"
app:layout_constraintLeft_toLeftOf=
"parent"
...
...
@@ -243,7 +246,7 @@
android:layout_marginStart=
"@dimen/height_80px"
android:layout_marginTop=
"@dimen/height_18px"
android:background=
"@drawable/dialog_btn_login_normal"
android:text=
"@string/login"
android:text=
"@string/
dialog_
login"
android:textColor=
"@color/write"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
...
...
app/src/main/res/layout/dialog_main.xml
View file @
dd9e6149
...
...
@@ -10,6 +10,7 @@
<android.support.constraint.ConstraintLayout
android:id=
"@+id/dialog_cl_main"
android:layout_width=
"@dimen/height_520px"
android:layout_height=
"@dimen/height_800px"
android:background=
"@drawable/app_write_bg"
>
...
...
@@ -39,20 +40,23 @@
android:layout_width=
"@dimen/height_300px"
android:layout_height=
"@dimen/height_160px"
android:src=
"@drawable/code_sample"
android:contentDescription=
"@string/iv_desc_hint"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<
EditText
android:id=
"@+id/dialog_
et
_card_num"
<
TextView
android:id=
"@+id/dialog_
tv
_card_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/height_80px"
android:layout_marginStart=
"@dimen/height_80px"
android:layout_marginTop=
"@dimen/height_50px"
android:textSize=
"@dimen/sp_30px"
android:textColor=
"@color/black"
android:background=
"@null"
android:hint=
"@string/card_hint_main"
android:hint=
"@string/
dialog_
card_hint_main"
android:singleLine=
"true"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
...
...
@@ -65,7 +69,8 @@
android:layout_marginEnd=
"@dimen/height_30px"
android:layout_marginTop=
"@dimen/height_58px"
android:src=
"@drawable/delete_normal"
app:layout_constraintLeft_toRightOf=
"@id/dialog_et_card_num"
android:contentDescription=
"@string/iv_desc_num_clear"
app:layout_constraintLeft_toRightOf=
"@id/dialog_tv_card_num"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/dialog_main_iv_hint"
/>
...
...
@@ -78,7 +83,7 @@
android:background=
"@color/color888"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/dialog_
et
_card_num"
/>
app:layout_constraintTop_toBottomOf=
"@id/dialog_
tv
_card_num"
/>
<TextView
android:id=
"@+id/dialog_tv_nocard_hint"
...
...
@@ -87,7 +92,7 @@
android:layout_marginEnd=
"@dimen/height_80px"
android:layout_marginStart=
"@dimen/height_80px"
android:layout_marginTop=
"@dimen/height_14px"
android:text=
"@string/no_shopping_hint"
android:text=
"@string/
dialog_
no_shopping_hint"
android:textColor=
"@color/hint_red_color"
android:textSize=
"@dimen/sp_20px"
app:layout_constraintLeft_toLeftOf=
"parent"
...
...
@@ -223,14 +228,14 @@
</android.support.v7.widget.GridLayout>
<Button
android:id=
"@+id/dialog_btn_
main
"
android:id=
"@+id/dialog_btn_
sure
"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/height_74px"
android:layout_marginEnd=
"@dimen/height_80px"
android:layout_marginStart=
"@dimen/height_80px"
android:layout_marginTop=
"@dimen/height_18px"
android:background=
"@drawable/dialog_btn_login_normal"
android:text=
"@string/sure"
android:text=
"@string/
dialog_
sure"
android:textColor=
"@color/write"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
...
...
app/src/main/res/layout/dialog_shoppingcart_pay.xml
0 → 100644
View file @
dd9e6149
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/dialog_layout_main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#90000000"
android:gravity=
"center"
android:orientation=
"vertical"
>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/dialog_cl_main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/height_300px"
android:background=
"@color/write"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/exit"
/>
</android.support.constraint.ConstraintLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/values/dimens.xml
View file @
dd9e6149
...
...
@@ -57,11 +57,12 @@
<dimen
name=
"height_174px"
>
87dp
</dimen>
<dimen
name=
"height_180px"
>
90dp
</dimen>
<dimen
name=
"height_188px"
>
94dp
</dimen>
<dimen
name=
"height_240px"
>
120dp
</dimen>
<dimen
name=
"height_220px"
>
110dp
</dimen>
<dimen
name=
"height_270px"
>
135dp
</dimen>
<dimen
name=
"height_210px"
>
105dp
</dimen>
<dimen
name=
"height_216px"
>
108dp
</dimen>
<dimen
name=
"height_220px"
>
110dp
</dimen>
<dimen
name=
"height_240px"
>
120dp
</dimen>
<dimen
name=
"height_252px"
>
126dp
</dimen>
<dimen
name=
"height_270px"
>
135dp
</dimen>
<dimen
name=
"height_282px"
>
141dp
</dimen>
<dimen
name=
"height_300px"
>
150dp
</dimen>
<dimen
name=
"height_310px"
>
155dp
</dimen>
...
...
@@ -79,6 +80,7 @@
<dimen
name=
"height_800px"
>
400dp
</dimen>
<dimen
name=
"height_1200px"
>
600dp
</dimen>
<dimen
name=
"sp_60px"
>
30sp
</dimen>
<dimen
name=
"sp_46px"
>
23sp
</dimen>
<dimen
name=
"sp_42px"
>
21sp
</dimen>
<dimen
name=
"sp_40px"
>
20sp
</dimen>
<dimen
name=
"sp_34px"
>
17sp
</dimen>
...
...
app/src/main/res/values/strings.xml
View file @
dd9e6149
...
...
@@ -5,18 +5,23 @@
<string
name=
"go_pay_btn"
>
开始结账
</string>
<string
name=
"is_member"
>
我是[XX]会员
</string>
<!--MainActivity-->
<string
name=
"main_hint_title"
>
请在下方扫描区扫描商品条码
</string>
<string
name=
"main_barcode_hands"
>
扫描有问题?手动输条码
</string>
<string
name=
"common_dialog_no_find_shopping"
>
没找到此商品
</string>
<string
name=
"common_dialog_shopping_barcode"
>
商品条码:693034353638
</string>
<string
name=
"common_dialog_shopping_sure"
>
知道了
</string>
<!--dialog -->
<string
name=
"dialog_title"
>
会员登录
</string>
<string
name=
"dialog_title_desc"
>
扫描会员卡条码也可登录
</string>
<string
name=
"card_hint_login"
>
请输入会员卡号
</string>
<string
name=
"no_card_hint"
>
没找到会员信息,请检查或联系店员协助
</string>
<string
name=
"card_hint_main"
>
请输入商品条码下数字
</string>
<string
name=
"no_shopping_hint"
>
没找到此商品,请检查或联系店员协助
</string>
<string
name=
"dialog_card_hint_login"
>
请输入会员卡号
</string>
<string
name=
"dialog_no_card_hint"
>
没找到会员信息,请检查或联系店员协助
</string>
<string
name=
"dialog_card_hint_main"
>
请输入商品条码下的数字
</string>
<string
name=
"dialog_no_shopping_hint"
>
没找到此商品,请检查或联系店员协助
</string>
<string
name=
"iv_desc_hint"
>
二维码图片
</string>
<string
name=
"iv_desc_num_clear"
>
清除数字
</string>
<string
name=
"num0"
>
0
</string>
<string
name=
"num1"
>
1
</string>
<string
name=
"num2"
>
2
</string>
...
...
@@ -27,11 +32,10 @@
<string
name=
"num7"
>
7
</string>
<string
name=
"num8"
>
8
</string>
<string
name=
"num9"
>
9
</string>
<string
name=
"login"
>
登陆
</string>
<string
name=
"sure"
>
确定
</string>
<string
name=
"
dialog_
login"
>
登陆
</string>
<string
name=
"
dialog_
sure"
>
确定
</string>
<!--ShoppingCart-->
<string
name=
"item_popwindow_small_bag"
>
小号购物袋
</string>
<string
name=
"item_cartgoods_delete"
>
删除
</string>
<string
name=
"cart_no_shopping_hint"
>
请在机器下方扫码区扫描商品
</string>
...
...
app/src/main/res/values/styles.xml
View file @
dd9e6149
...
...
@@ -9,4 +9,10 @@
<item
name=
"android:windowNoTitle"
>
true
</item>
-->
</style>
<style
name=
"line_height05"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
0.5dp
</item>
<item
name=
"android:background"
>
@color/line_color
</item>
</style>
</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