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
31d317a1
Commit
31d317a1
authored
Aug 14, 2018
by
llxqb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购物车界面-部分
parent
dc28521e
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
268 additions
and
163 deletions
+268
-163
app/src/main/AndroidManifest.xml
+2
-1
app/src/main/java/com/freemud/app/facepay/MainActivity.java
+10
-129
app/src/main/java/com/freemud/app/facepay/ShoppingCartActivity.java
+195
-0
app/src/main/java/com/freemud/app/facepay/views/LoginDialog.java
+1
-1
app/src/main/java/com/freemud/app/facepay/views/MainDialog.java
+1
-2
app/src/main/res/drawable/app_btn_cart_click_selector.xml
+0
-0
app/src/main/res/drawable/app_btn_cart_exit_selector.xml
+0
-0
app/src/main/res/drawable/img_cart_arrow.xml
+0
-0
app/src/main/res/layout/activity_main.xml
+1
-1
app/src/main/res/layout/activity_shopping_cart.xml
+47
-21
app/src/main/res/layout/common_title_layout.xml
+1
-1
app/src/main/res/layout/dialog_login.xml
+0
-0
app/src/main/res/layout/dialog_main.xml
+0
-0
app/src/main/res/layout/item_adapter_popwindow_bag.xml
+1
-1
app/src/main/res/values/strings.xml
+9
-6
No files found.
app/src/main/AndroidManifest.xml
View file @
31d317a1
...
...
@@ -10,7 +10,6 @@
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
<activity
android:name=
".MainActivity"
/>
<activity
android:name=
".LoginActivity"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
@@ -18,6 +17,7 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity
android:name=
".ShoppingCartActivity"
></activity>
</application>
</manifest>
\ No newline at end of file
app/src/main/java/com/freemud/app/facepay/MainActivity.java
View file @
31d317a1
...
...
@@ -33,146 +33,27 @@ import com.freemud.app.facepay.views.MainDialog;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
MainActivity
extends
AppCompatActivity
implements
View
.
OnClickListener
,
MainDialog
.
MainDialogListener
{
public
class
MainActivity
extends
AppCompatActivity
implements
MainDialog
.
MainDialogListener
{
public
static
String
TAG
=
"MainActivity"
;
private
RecyclerView
mMainRecyclerView
;
private
CartGoodsAdapter
mCartGoodsAdapter
;
private
List
<
Goods
>
mGoodsList
;
private
LinearLayout
mMainLlAddbag
;
private
CustomPopWindow
mCustomPopWindow
;
private
List
<
ShoppingBag
>
shoppingBagList
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_main
_goods
);
setContentView
(
R
.
layout
.
activity_main
);
initView
();
initData
();
initRecycler
();
}
private
void
initView
()
{
TextView
mCommonTvLeft
=
findViewById
(
R
.
id
.
common_tv_left
);
TextView
mMainBarcodeHands
=
findViewById
(
R
.
id
.
main_barcode_hands
);
mMainRecyclerView
=
findViewById
(
R
.
id
.
main_recyclerView
);
mMainLlAddbag
=
findViewById
(
R
.
id
.
main_ll_addbag
);
mCommonTvLeft
.
setOnClickListener
(
this
);
mMainBarcodeHands
.
setOnClickListener
(
this
);
mMainLlAddbag
.
setOnClickListener
(
this
);
}
@Override
public
void
onClick
(
View
v
)
{
switch
(
v
.
getId
())
{
case
R
.
id
.
common_tv_left
:
//退出
Toast
.
makeText
(
MainActivity
.
this
,
"退出"
,
Toast
.
LENGTH_SHORT
).
show
();
break
;
case
R
.
id
.
main_barcode_hands
:
//手动输入条形码
MainDialog
mainDialog
=
MainDialog
.
newInstance
();
mainDialog
.
setListener
(
MainActivity
.
this
);
DialogFactory
.
showDialogFragment
(
getSupportFragmentManager
(),
mainDialog
,
LoginDialog
.
TAG
);
break
;
case
R
.
id
.
main_ll_addbag
:
//添加购物袋
initPopWindow
();
break
;
}
}
private
void
initPopWindow
()
{
initBagData
();
View
contentView
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
popwindow_bag
,
null
);
//处理popWindow 显示内容
handleListView
(
contentView
);
//创建并显示popWindow
mCustomPopWindow
=
new
CustomPopWindow
.
PopupWindowBuilder
(
this
)
.
setView
(
contentView
)
.
enableBackgroundDark
(
true
)
// .size(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)//显示大小
.
create
();
mCustomPopWindow
.
showAsDropDown
(
mMainLlAddbag
,
40
,
-(
mMainLlAddbag
.
getHeight
()
+
mCustomPopWindow
.
getHeight
()
+
60
));
}
private
void
initBagData
()
{
shoppingBagList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
ShoppingBag
shoppingBag
=
new
ShoppingBag
();
if
(
i
==
0
)
{
shoppingBag
.
name
=
"小号购物袋"
;
shoppingBag
.
price
=
0.2
;
}
if
(
i
==
1
)
{
shoppingBag
.
name
=
"中号购物袋"
;
shoppingBag
.
price
=
0.30
;
}
if
(
i
==
2
)
{
shoppingBag
.
name
=
"大号购物袋"
;
shoppingBag
.
price
=
0.40
;
}
shoppingBagList
.
add
(
shoppingBag
);
}
}
private
void
handleListView
(
View
contentView
)
{
RecyclerView
recyclerView
=
contentView
.
findViewById
(
R
.
id
.
item_popwindow_recyclerView
);
LinearLayoutManager
manager
=
new
LinearLayoutManager
(
this
);
manager
.
setOrientation
(
LinearLayoutManager
.
VERTICAL
);
recyclerView
.
setLayoutManager
(
manager
);
recyclerView
.
addItemDecoration
(
new
DividerItemDecoration
(
this
,
DividerItemDecoration
.
VERTICAL
));
ShoppingBagAdapter
mShoppingBagAdapter
=
new
ShoppingBagAdapter
(
shoppingBagList
);
recyclerView
.
setAdapter
(
mShoppingBagAdapter
);
mShoppingBagAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
ShoppingBag
shoppingBag
=
(
ShoppingBag
)
adapter
.
getItem
(
position
);
if
(
shoppingBag
!=
null
)
{
Toast
.
makeText
(
MainActivity
.
this
,
"item"
+
position
,
Toast
.
LENGTH_SHORT
).
show
();
}
TextView
mMainHineTitle
=
findViewById
(
R
.
id
.
main_hint_title
);
TextView
mMainHineHands
=
findViewById
(
R
.
id
.
main_barcode_hands
);
mMainHineTitle
.
setOnClickListener
(
v
->
{
ShoppingCartActivity
.
start
(
MainActivity
.
this
);
});
}
private
void
initData
()
{
mGoodsList
=
new
ArrayList
<>();
for
(
int
i
=
1
;
i
<=
10
;
i
++)
{
Goods
goods
=
new
Goods
();
goods
.
name
=
"养生大宝粥"
+
i
+
"味"
;
goods
.
originalPrice
=
8.90
;
goods
.
discountPrice
=
7.88
;
goods
.
count
=
i
;
mGoodsList
.
add
(
goods
);
}
}
private
void
initRecycler
()
{
mMainRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mCartGoodsAdapter
=
new
CartGoodsAdapter
(
mGoodsList
);
mMainRecyclerView
.
setAdapter
(
mCartGoodsAdapter
);
mCartGoodsAdapter
.
setOnItemChildClickListener
((
adapter
,
view
,
position
)
->
{
Goods
goods
=
(
Goods
)
adapter
.
getItem
(
position
);
if
(
goods
!=
null
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
item_cartgoods_btn_delete
:
Toast
.
makeText
(
MainActivity
.
this
,
"已删除"
,
Toast
.
LENGTH_SHORT
).
show
();
adapter
.
remove
(
position
);
break
;
case
R
.
id
.
item_cartgoods_iv_reduceNum
:
if
(
goods
.
count
>
1
)
{
goods
.
count
--;
mCartGoodsAdapter
.
setData
(
position
,
goods
);
}
else
{
Toast
.
makeText
(
MainActivity
.
this
,
"商品数量不能小于1"
,
Toast
.
LENGTH_SHORT
).
show
();
}
break
;
case
R
.
id
.
item_cartgoods_iv_addNum
:
goods
.
count
++;
mCartGoodsAdapter
.
setData
(
position
,
goods
);
break
;
}
}
mMainHineHands
.
setOnClickListener
(
v
->
{
MainDialog
mainDialog
=
MainDialog
.
newInstance
();
mainDialog
.
setListener
(
MainActivity
.
this
);
DialogFactory
.
showDialogFragment
(
getSupportFragmentManager
(),
mainDialog
,
LoginDialog
.
TAG
);
});
}
...
...
app/src/main/java/com/freemud/app/facepay/ShoppingCartActivity.java
0 → 100644
View file @
31d317a1
package
com
.
freemud
.
app
.
facepay
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.support.v7.app.AppCompatActivity
;
import
android.os.Bundle
;
import
android.support.v7.widget.DividerItemDecoration
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
com.freemud.app.facepay.adapter.CartGoodsAdapter
;
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.CustomPopWindow
;
import
com.freemud.app.facepay.views.LoginDialog
;
import
com.freemud.app.facepay.views.MainDialog
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
ShoppingCartActivity
extends
AppCompatActivity
implements
View
.
OnClickListener
,
MainDialog
.
MainDialogListener
{
public
static
String
TAG
=
"ShoppingCartActivity"
;
private
RecyclerView
mCartRecyclerView
;
private
CartGoodsAdapter
mCartGoodsAdapter
;
private
List
<
Goods
>
mGoodsList
;
private
LinearLayout
mCartLlAddbag
;
private
CustomPopWindow
mCustomPopWindow
;
private
List
<
ShoppingBag
>
shoppingBagList
;
private
LinearLayout
mCartLlCartNoShopping
;
//购物车没商品显示的布局
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_shopping_cart
);
initView
();
initData
();
initRecycler
();
}
private
void
initView
()
{
TextView
mCommonTvLeft
=
findViewById
(
R
.
id
.
common_tv_left
);
TextView
mCartBarcodeHands
=
findViewById
(
R
.
id
.
cart_barcode_hands
);
mCartRecyclerView
=
findViewById
(
R
.
id
.
cart_recyclerView
);
mCartLlAddbag
=
findViewById
(
R
.
id
.
cart_ll_addbag
);
mCartLlCartNoShopping
=
findViewById
(
R
.
id
.
cart_ll_cart_no_shopping
);
mCommonTvLeft
.
setOnClickListener
(
this
);
mCartBarcodeHands
.
setOnClickListener
(
this
);
mCartLlAddbag
.
setOnClickListener
(
this
);
}
@Override
public
void
onClick
(
View
v
)
{
switch
(
v
.
getId
())
{
case
R
.
id
.
common_tv_left
:
//退出
Toast
.
makeText
(
ShoppingCartActivity
.
this
,
"退出"
,
Toast
.
LENGTH_SHORT
).
show
();
finish
();
break
;
case
R
.
id
.
cart_barcode_hands
:
//手动输入条形码
MainDialog
mainDialog
=
MainDialog
.
newInstance
();
mainDialog
.
setListener
(
ShoppingCartActivity
.
this
);
DialogFactory
.
showDialogFragment
(
getSupportFragmentManager
(),
mainDialog
,
LoginDialog
.
TAG
);
break
;
case
R
.
id
.
cart_ll_addbag
:
//添加购物袋
initPopWindow
();
break
;
}
}
private
void
initPopWindow
()
{
initBagData
();
View
contentView
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
popwindow_bag
,
null
);
//处理popWindow 显示内容
handleListView
(
contentView
);
//创建并显示popWindow
mCustomPopWindow
=
new
CustomPopWindow
.
PopupWindowBuilder
(
this
)
.
setView
(
contentView
)
.
enableBackgroundDark
(
true
)
// .size(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)//显示大小
.
create
();
mCustomPopWindow
.
showAsDropDown
(
mCartLlAddbag
,
40
,
-(
mCartLlAddbag
.
getHeight
()
+
mCustomPopWindow
.
getHeight
()
+
60
));
}
private
void
initBagData
()
{
shoppingBagList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
ShoppingBag
shoppingBag
=
new
ShoppingBag
();
if
(
i
==
0
)
{
shoppingBag
.
name
=
"小号购物袋"
;
shoppingBag
.
price
=
0.2
;
}
if
(
i
==
1
)
{
shoppingBag
.
name
=
"中号购物袋"
;
shoppingBag
.
price
=
0.30
;
}
if
(
i
==
2
)
{
shoppingBag
.
name
=
"大号购物袋"
;
shoppingBag
.
price
=
0.40
;
}
shoppingBagList
.
add
(
shoppingBag
);
}
}
private
void
handleListView
(
View
contentView
)
{
RecyclerView
recyclerView
=
contentView
.
findViewById
(
R
.
id
.
item_popwindow_recyclerView
);
LinearLayoutManager
manager
=
new
LinearLayoutManager
(
this
);
manager
.
setOrientation
(
LinearLayoutManager
.
VERTICAL
);
recyclerView
.
setLayoutManager
(
manager
);
recyclerView
.
addItemDecoration
(
new
DividerItemDecoration
(
this
,
DividerItemDecoration
.
VERTICAL
));
ShoppingBagAdapter
mShoppingBagAdapter
=
new
ShoppingBagAdapter
(
shoppingBagList
);
recyclerView
.
setAdapter
(
mShoppingBagAdapter
);
mShoppingBagAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
ShoppingBag
shoppingBag
=
(
ShoppingBag
)
adapter
.
getItem
(
position
);
if
(
shoppingBag
!=
null
)
{
Toast
.
makeText
(
ShoppingCartActivity
.
this
,
"item"
+
position
,
Toast
.
LENGTH_SHORT
).
show
();
}
});
}
private
void
initData
()
{
mGoodsList
=
new
ArrayList
<>();
for
(
int
i
=
1
;
i
<=
2
;
i
++)
{
Goods
goods
=
new
Goods
();
goods
.
name
=
"养生大宝粥"
+
i
+
"味"
;
goods
.
originalPrice
=
8.90
;
goods
.
discountPrice
=
7.88
;
goods
.
count
=
i
;
mGoodsList
.
add
(
goods
);
}
if
(
mGoodsList
.
size
()
==
0
)
{
mCartRecyclerView
.
setVisibility
(
View
.
GONE
);
mCartLlCartNoShopping
.
setVisibility
(
View
.
VISIBLE
);
}
}
private
void
initRecycler
()
{
mCartRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mCartGoodsAdapter
=
new
CartGoodsAdapter
(
mGoodsList
);
mCartRecyclerView
.
setAdapter
(
mCartGoodsAdapter
);
mCartGoodsAdapter
.
setOnItemChildClickListener
((
adapter
,
view
,
position
)
->
{
Goods
goods
=
(
Goods
)
adapter
.
getItem
(
position
);
if
(
goods
!=
null
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
item_cartgoods_btn_delete
:
Toast
.
makeText
(
ShoppingCartActivity
.
this
,
"已删除"
,
Toast
.
LENGTH_SHORT
).
show
();
adapter
.
remove
(
position
);
break
;
case
R
.
id
.
item_cartgoods_iv_reduceNum
:
if
(
goods
.
count
>
1
)
{
goods
.
count
--;
mCartGoodsAdapter
.
setData
(
position
,
goods
);
}
else
{
Toast
.
makeText
(
ShoppingCartActivity
.
this
,
"将移除商品"
,
Toast
.
LENGTH_SHORT
).
show
();
adapter
.
remove
(
position
);
if
(
adapter
.
getData
().
size
()
==
0
)
{
mCartRecyclerView
.
setVisibility
(
View
.
GONE
);
mCartLlCartNoShopping
.
setVisibility
(
View
.
VISIBLE
);
}
}
break
;
case
R
.
id
.
item_cartgoods_iv_addNum
:
goods
.
count
++;
mCartGoodsAdapter
.
setData
(
position
,
goods
);
break
;
}
}
});
}
public
static
void
start
(
Context
context
)
{
Intent
intent
=
new
Intent
(
context
,
ShoppingCartActivity
.
class
);
context
.
startActivity
(
intent
);
}
@Override
public
void
mainDialogBtnOkListener
(
boolean
mainFlag
)
{
}
}
app/src/main/java/com/freemud/app/facepay/views/LoginDialog.java
View file @
31d317a1
...
...
@@ -32,7 +32,7 @@ public class LoginDialog extends BaseDialogFragment {
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_login_dialog
,
container
,
true
);
View
view
=
inflater
.
inflate
(
R
.
layout
.
dialog_login
,
container
,
true
);
RelativeLayout
mDialogLayoutLogin
=
view
.
findViewById
(
R
.
id
.
dialog_layout_login
);
LinearLayout
mDialogLiExit
=
view
.
findViewById
(
R
.
id
.
dialog_ll_exit
);
LinearLayout
mDialogLlNumDelete
=
view
.
findViewById
(
R
.
id
.
dialog_ll_num_delete
);
...
...
app/src/main/java/com/freemud/app/facepay/views/MainDialog.java
View file @
31d317a1
...
...
@@ -7,7 +7,6 @@ import android.view.ViewGroup;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
com.freemud.app.facepay.R
;
import
com.freemud.app.facepay.help.DialogFactory
;
...
...
@@ -33,7 +32,7 @@ public class MainDialog extends BaseDialogFragment {
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_main_dialog
,
container
,
true
);
View
view
=
inflater
.
inflate
(
R
.
layout
.
dialog_main
,
container
,
true
);
LinearLayout
mDialogLayouyMain
=
view
.
findViewById
(
R
.
id
.
dialog_layout_main
);
LinearLayout
mDialogLiExit
=
view
.
findViewById
(
R
.
id
.
dialog_ll_exit
);
LinearLayout
mDialogLlNumDelete
=
view
.
findViewById
(
R
.
id
.
dialog_ll_num_delete
);
...
...
app/src/main/res/drawable/app_btn_
main
_click_selector.xml
→
app/src/main/res/drawable/app_btn_
cart
_click_selector.xml
View file @
31d317a1
File moved
app/src/main/res/drawable/app_btn_
main
_exit_selector.xml
→
app/src/main/res/drawable/app_btn_
cart
_exit_selector.xml
View file @
31d317a1
File moved
app/src/main/res/drawable/img_
main
_arrow.xml
→
app/src/main/res/drawable/img_
cart
_arrow.xml
View file @
31d317a1
File moved
app/src/main/res/layout/activity_main.xml
View file @
31d317a1
...
...
@@ -39,7 +39,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/height_58px"
android:layout_marginTop=
"@dimen/height_40px"
android:drawableEnd=
"@drawable/img_
main
_arrow"
android:drawableEnd=
"@drawable/img_
cart
_arrow"
android:gravity=
"center"
android:text=
"@string/main_barcode_hands"
android:background=
"@drawable/app_btn_login_selector"
...
...
app/src/main/res/layout/activity_
main_goods
.xml
→
app/src/main/res/layout/activity_
shopping_cart
.xml
View file @
31d317a1
...
...
@@ -3,54 +3,80 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
"com.freemud.app.facepay.
Main
Activity"
>
tools:context=
"com.freemud.app.facepay.
ShoppingCart
Activity"
>
<include
android:id=
"@+id/common_layout"
layout=
"@layout/common_title_layout"
/>
<View
android:id=
"@+id/
main
_view_line"
android:id=
"@+id/
cart
_view_line"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_below=
"@id/common_layout"
android:background=
"@color/line_color"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/
main
_recyclerView"
android:id=
"@+id/
cart
_recyclerView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_above=
"@id/main_buttom_rl"
android:layout_below=
"@id/main_view_line"
/>
android:layout_above=
"@id/cart_buttom_rl"
android:layout_below=
"@id/cart_view_line"
/>
<LinearLayout
android:id=
"@+id/cart_ll_cart_no_shopping"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_above=
"@id/cart_buttom_rl"
android:layout_below=
"@id/cart_view_line"
android:gravity=
"top"
android:orientation=
"vertical"
android:paddingStart=
"@dimen/height_30px"
android:visibility=
"gone"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/height_130px"
android:gravity=
"center_vertical"
android:text=
"@string/cart_no_shopping_hint"
android:textColor=
"@color/color888"
android:textSize=
"@dimen/sp_30px"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/line_color"
/>
</LinearLayout>
<RelativeLayout
android:id=
"@+id/
main
_buttom_rl"
android:id=
"@+id/
cart
_buttom_rl"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/height_80px"
android:layout_above=
"@id/
main
_tv_goods_num"
android:layout_above=
"@id/
cart
_tv_goods_num"
android:layout_marginBottom=
"@dimen/height_34px"
android:background=
"@color/app_gray"
android:gravity=
"center_vertical"
>
<LinearLayout
android:id=
"@+id/
main
_ll_addbag"
android:id=
"@+id/
cart
_ll_addbag"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentStart=
"true"
android:layout_centerVertical=
"true"
android:layout_marginStart=
"@dimen/height_8px"
android:
padding=
"@dimen/height_12px
"
android:
background=
"@drawable/app_btn_main_click_selector
"
android:
orientation=
"horizontal
"
>
android:
background=
"@drawable/app_btn_cart_click_selector
"
android:
orientation=
"horizontal
"
android:
padding=
"@dimen/height_12px
"
>
<ImageView
android:id=
"@+id/
main
_iv_bag"
android:id=
"@+id/
cart
_iv_bag"
android:layout_width=
"@dimen/height_34px"
android:layout_height=
"@dimen/height_34px"
android:src=
"@drawable/bag"
/>
<TextView
android:id=
"@+id/
main
_tv_bag"
android:id=
"@+id/
cart
_tv_bag"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginStart=
"@dimen/height_20px"
...
...
@@ -62,12 +88,12 @@
<TextView
android:id=
"@+id/
main
_barcode_hands"
android:id=
"@+id/
cart
_barcode_hands"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentEnd=
"true"
android:background=
"@drawable/app_btn_
main
_click_selector"
android:drawableEnd=
"@drawable/img_
main
_arrow"
android:background=
"@drawable/app_btn_
cart
_click_selector"
android:drawableEnd=
"@drawable/img_
cart
_arrow"
android:gravity=
"center_vertical|end"
android:paddingLeft=
"@dimen/height_12px"
android:text=
"@string/main_barcode_hands"
...
...
@@ -76,10 +102,10 @@
</RelativeLayout>
<TextView
android:id=
"@+id/
main
_tv_goods_num"
android:id=
"@+id/
cart
_tv_goods_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_above=
"@id/
main
_tv_goods_price"
android:layout_above=
"@id/
cart
_tv_goods_price"
android:layout_marginBottom=
"@dimen/height_22px"
android:gravity=
"center_horizontal"
android:text=
"共1件商品,合计"
...
...
@@ -87,10 +113,10 @@
android:textSize=
"@dimen/sp_26px"
/>
<TextView
android:id=
"@+id/
main
_tv_goods_price"
android:id=
"@+id/
cart
_tv_goods_price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_above=
"@id/
main
_btn_pay"
android:layout_above=
"@id/
cart
_btn_pay"
android:layout_marginBottom=
"@dimen/height_28px"
android:gravity=
"center_horizontal"
android:text=
"¥99.99"
...
...
@@ -98,7 +124,7 @@
android:textSize=
"@dimen/sp_60px"
/>
<Button
android:id=
"@+id/
main
_btn_pay"
android:id=
"@+id/
cart
_btn_pay"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/height_80px"
android:layout_alignParentBottom=
"true"
...
...
app/src/main/res/layout/common_title_layout.xml
View file @
31d317a1
...
...
@@ -10,7 +10,7 @@
android:layout_height=
"@dimen/height_60px"
android:layout_centerVertical=
"true"
android:layout_marginStart=
"@dimen/height_20px"
android:background=
"@drawable/app_btn_
main
_exit_selector"
android:background=
"@drawable/app_btn_
cart
_exit_selector"
android:gravity=
"center"
android:text=
"退出"
android:textColor=
"@color/color353535"
...
...
app/src/main/res/layout/
fragment_login_dialog
.xml
→
app/src/main/res/layout/
dialog_login
.xml
View file @
31d317a1
File moved
app/src/main/res/layout/
fragment_main_dialog
.xml
→
app/src/main/res/layout/
dialog_main
.xml
View file @
31d317a1
File moved
app/src/main/res/layout/item_adapter_popwindow_bag.xml
View file @
31d317a1
...
...
@@ -4,7 +4,7 @@
android:layout_width=
"@dimen/height_188px"
android:layout_height=
"@dimen/height_100px"
android:layout_margin=
"@dimen/height_8px"
android:background=
"@drawable/app_btn_
main
_click_selector"
android:background=
"@drawable/app_btn_
cart
_click_selector"
android:gravity=
"center"
android:orientation=
"vertical"
>
...
...
app/src/main/res/values/strings.xml
View file @
31d317a1
<resources>
<string
name=
"app_name"
>
FacePay
</string>
<!--
ma
inActivity-->
<!--
Log
inActivity-->
<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>
<!--dialog -->
<string
name=
"dialog_title"
>
会员登录
</string>
<string
name=
"dialog_title_desc"
>
扫描会员卡条码也可登录
</string>
<string
name=
"card_hint_login"
>
请输入会员卡号
</string>
<string
name=
"card_hint_main"
>
请输入商品条码下数字
</string>
<string
name=
"no_card_hint"
>
没找到会员信息,请检查或联系店员协助
</string>
<string
name=
"card_hint_main"
>
请输入商品条码下数字
</string>
<string
name=
"no_shopping_hint"
>
没找到此商品,请检查或联系店员协助
</string>
<string
name=
"num0"
>
0
</string>
<string
name=
"num1"
>
1
</string>
...
...
@@ -25,11 +30,9 @@
<string
name=
"login"
>
登陆
</string>
<string
name=
"sure"
>
确定
</string>
<!--main-->
<string
name=
"main_hint_title"
>
请在下方扫描区扫描商品条码
</string>
<string
name=
"main_barcode_hands"
>
扫描有问题?手动输条码
</string>
<!--ShoppingCart-->
<string
name=
"item_popwindow_small_bag"
>
小号购物袋
</string>
<string
name=
"item_cartgoods_delete"
>
删除
</string>
<string
name=
"cart_no_shopping_hint"
>
请在机器下方扫码区扫描商品
</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