Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
machine
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
android
machine
Commits
daa586fa
Commit
daa586fa
authored
May 23, 2022
by
wjg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
4b8660af
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
211 additions
and
79 deletions
+211
-79
app/src/main/java/com/ihaoin/hooloo/device/adapter/GoodsAdapter.java
+16
-4
app/src/main/java/com/ihaoin/hooloo/device/adapter/TrolleyAdapter.java
+5
-0
app/src/main/java/com/ihaoin/hooloo/device/view/GoodsDetailDialog.java
+56
-12
app/src/main/res/drawable/bg_spec_recommend.xml
+11
-0
app/src/main/res/drawable/ic_baseline_delete_outline_24.xml
+0
-5
app/src/main/res/drawable/sel_butn_check.xml
+1
-1
app/src/main/res/layout/activity_launcher.xml
+6
-3
app/src/main/res/layout/activity_settings.xml
+1
-0
app/src/main/res/layout/item_goods.xml
+19
-13
app/src/main/res/layout/item_spec.xml
+2
-2
app/src/main/res/layout/item_spec_rule.xml
+35
-11
app/src/main/res/layout/item_spec_rule_recommend.xml
+11
-0
app/src/main/res/layout/item_trolley.xml
+14
-9
app/src/main/res/layout/view_goods_detail.xml
+14
-8
app/src/main/res/layout/view_trolley.xml
+12
-8
app/src/main/res/mipmap-xhdpi/jianhao_2x.png
+0
-0
app/src/main/res/mipmap-xhdpi/lajitong_2x.png
+0
-0
app/src/main/res/mipmap-xhdpi/weixuanzhong_2x.png
+0
-0
app/src/main/res/values-w1080dp/dimens.xml
+2
-0
app/src/main/res/values/colors.xml
+3
-2
app/src/main/res/values/dimens.xml
+3
-1
No files found.
app/src/main/java/com/ihaoin/hooloo/device/adapter/GoodsAdapter.java
View file @
daa586fa
package
com
.
ihaoin
.
hooloo
.
device
.
adapter
;
import
android.content.Context
;
import
android.graphics.Paint
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -84,10 +85,7 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo
helper
.
setText
(
R
.
id
.
txt_price
,
String
.
valueOf
(
sku
.
getPrice
()));
helper
.
setText
(
R
.
id
.
txt_discount
,
String
.
valueOf
(
sku
.
getDiscount
()));
if
(
Base
.
FALSE
.
equals
(
sku
.
getState
()))
{
helper
.
setGone
(
R
.
id
.
txt_sellout
,
true
);
helper
.
setGone
(
R
.
id
.
butn_add
,
false
);
}
else
{
if
(
Base
.
TRUE
.
equals
(
sku
.
getState
()))
{
helper
.
setGone
(
R
.
id
.
txt_sellout
,
false
);
helper
.
setGone
(
R
.
id
.
butn_add
,
true
);
View
butnAdd
=
helper
.
getView
(
R
.
id
.
butn_add
);
...
...
@@ -95,9 +93,23 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo
ViewGroup
layoutItem
=
helper
.
getView
(
R
.
id
.
layout_item
);
Utils
.
setTouchDelegate
(
layoutItem
,
Arrays
.
asList
(
butnAdd
));
}
else
{
helper
.
setGone
(
R
.
id
.
txt_sellout
,
true
);
helper
.
setGone
(
R
.
id
.
butn_add
,
false
);
}
}
if
(
Base
.
TRUE
.
equals
(
goods
.
getIsRecommend
()))
{
helper
.
setVisible
(
R
.
id
.
img_recommend
,
true
);
}
else
{
helper
.
setGone
(
R
.
id
.
img_recommend
,
false
);
}
TextView
icoDiscount
=
helper
.
getView
(
R
.
id
.
ico_discount
);
TextView
txtDiscount
=
helper
.
getView
(
R
.
id
.
txt_discount
);
icoDiscount
.
setPaintFlags
(
icoDiscount
.
getPaintFlags
()
|
Paint
.
STRIKE_THRU_TEXT_FLAG
);
txtDiscount
.
setPaintFlags
(
txtDiscount
.
getPaintFlags
()
|
Paint
.
STRIKE_THRU_TEXT_FLAG
);
View
layoutItem
=
helper
.
getView
(
R
.
id
.
layout_item
);
layoutItem
.
setOnClickListener
(
v
->
Utils
.
showGoodsDetail
(
mContext
,
goods
));
...
...
app/src/main/java/com/ihaoin/hooloo/device/adapter/TrolleyAdapter.java
View file @
daa586fa
package
com
.
ihaoin
.
hooloo
.
device
.
adapter
;
import
android.content.Context
;
import
android.graphics.Paint
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -39,6 +40,7 @@ public class TrolleyAdapter extends BaseAdapter {
TextView
txtOptions
=
convertView
.
findViewById
(
R
.
id
.
txt_options
);
TextView
txtPrice
=
convertView
.
findViewById
(
R
.
id
.
txt_price
);
TextView
txtDiscount
=
convertView
.
findViewById
(
R
.
id
.
txt_discount
);
TextView
icoDiscount
=
convertView
.
findViewById
(
R
.
id
.
ico_discount
);
View
butnSubtract
=
convertView
.
findViewById
(
R
.
id
.
butn_subtract
);
TextView
txtCount
=
convertView
.
findViewById
(
R
.
id
.
txt_count
);
View
butnAdd
=
convertView
.
findViewById
(
R
.
id
.
butn_add
);
...
...
@@ -67,6 +69,9 @@ public class TrolleyAdapter extends BaseAdapter {
txtPrice
.
setText
(
goods
.
getPrice
().
toString
());
txtDiscount
.
setText
(
goods
.
getDiscount
().
toString
());
icoDiscount
.
setPaintFlags
(
icoDiscount
.
getPaintFlags
()
|
Paint
.
STRIKE_THRU_TEXT_FLAG
);
txtDiscount
.
setPaintFlags
(
txtDiscount
.
getPaintFlags
()
|
Paint
.
STRIKE_THRU_TEXT_FLAG
);
txtCount
.
setText
(
goods
.
getCount
().
toString
());
butnSubtract
.
setOnClickListener
(
v
->
trolleyView
.
subtractGoods
(
position
));
butnAdd
.
setOnClickListener
(
v
->
trolleyView
.
addGoods
(
position
));
...
...
app/src/main/java/com/ihaoin/hooloo/device/view/GoodsDetailDialog.java
View file @
daa586fa
...
...
@@ -2,13 +2,13 @@ package com.ihaoin.hooloo.device.view;
import
android.app.Dialog
;
import
android.content.Context
;
import
android.graphics.Paint
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.RadioButton
;
import
android.widget.RadioGroup
;
import
android.widget.TextView
;
import
android.widget.Toast
;
...
...
@@ -42,6 +42,7 @@ public class GoodsDetailDialog extends Dialog {
private
LinearLayout
layoutSpecs
;
private
LinearLayout
layoutImages
;
private
TextView
txtPrice
;
private
TextView
icoDiscount
;
private
TextView
txtDiscount
;
private
Button
butnSubtract
;
private
TextView
txtCount
;
...
...
@@ -76,6 +77,7 @@ public class GoodsDetailDialog extends Dialog {
layoutSpecs
=
findViewById
(
R
.
id
.
layout_specs
);
layoutImages
=
findViewById
(
R
.
id
.
layout_images
);
txtPrice
=
findViewById
(
R
.
id
.
txt_price
);
icoDiscount
=
findViewById
(
R
.
id
.
ico_discount
);
txtDiscount
=
findViewById
(
R
.
id
.
txt_discount
);
butnSubtract
=
findViewById
(
R
.
id
.
butn_subtract
);
txtCount
=
findViewById
(
R
.
id
.
txt_count
);
...
...
@@ -97,6 +99,9 @@ public class GoodsDetailDialog extends Dialog {
butnSubtract
.
setOnClickListener
(
v
->
subtractGoods
());
butnAdd
.
setOnClickListener
(
v
->
addGoods
());
icoDiscount
.
setPaintFlags
(
icoDiscount
.
getPaintFlags
()
|
Paint
.
STRIKE_THRU_TEXT_FLAG
);
txtDiscount
.
setPaintFlags
(
txtDiscount
.
getPaintFlags
()
|
Paint
.
STRIKE_THRU_TEXT_FLAG
);
butnBuy
.
setOnClickListener
(
v
->
buyNow
());
butnTrolley
.
setOnClickListener
(
v
->
addTrolley
());
...
...
@@ -157,29 +162,55 @@ public class GoodsDetailDialog extends Dialog {
}
View
specView
=
getLayoutInflater
().
inflate
(
R
.
layout
.
item_spec
,
null
);
TextView
txtName
=
specView
.
findViewById
(
R
.
id
.
txt_name
);
RadioGroup
specGroup
=
specView
.
findViewById
(
R
.
id
.
group_spec
);
LinearLayout
layoutRules
=
specView
.
findViewById
(
R
.
id
.
layout_rules
);
txtName
.
setText
(
spec
.
getSpecName
());
spec
.
getRules
().
forEach
(
rule
->
{
RadioGroup
.
LayoutParams
layoutParams
=
new
RadioGroup
.
LayoutParams
(
RadioGroup
.
LayoutParams
.
WRAP_CONTENT
,
RadioGroup
.
LayoutParams
.
WRAP_CONTENT
);
LinearLayout
.
LayoutParams
layoutParams
=
new
LinearLayout
.
LayoutParams
(
RadioGroup
.
LayoutParams
.
WRAP_CONTENT
,
RadioGroup
.
LayoutParams
.
WRAP_CONTENT
);
layoutParams
.
rightMargin
=
Utils
.
getDimens
(
getContext
(),
R
.
dimen
.
padding5
);
RadioButton
button
=
(
RadioButton
)
getLayoutInflater
().
inflate
(
R
.
layout
.
item_spec_rule
,
null
);
View
ruleView
=
getLayoutInflater
().
inflate
(
R
.
layout
.
item_spec_rule
,
null
);
ruleView
.
setTag
(
rule
);
TextView
button
=
ruleView
.
findViewById
(
R
.
id
.
butn_rule
);
button
.
setId
(
rule
.
getRuleId
());
button
.
setText
(
rule
.
getRuleName
());
button
.
setTag
(
rule
);
if
(!
Base
.
TRUE
.
equals
(
rule
.
getState
()))
{
button
.
setEnabled
(
false
);
}
else
if
(
Base
.
TRUE
.
equals
(
rule
.
getIsDefault
()))
{
button
.
setChecked
(
true
);
button
.
setSelected
(
true
);
ruleView
.
setSelected
(
true
);
}
specGroup
.
addView
(
button
,
layoutParams
);
if
(
Base
.
TRUE
.
equals
(
rule
.
getIsRecommend
()))
{
ruleView
.
findViewById
(
R
.
id
.
txt_recommend
).
setVisibility
(
View
.
VISIBLE
);
}
layoutRules
.
addView
(
ruleView
,
layoutParams
);
ruleView
.
setOnClickListener
(
v
->
{
clearSelected
(
layoutRules
);
ruleView
.
setSelected
(
true
);
button
.
setSelected
(
true
);
changeSkuWithRule
();
});
});
layoutSpecs
.
addView
(
specView
);
specGroup
.
setOnCheckedChangeListener
((
group
,
checkedId
)
->
changeSkuWithRule
());
// layoutRules
.setOnCheckedChangeListener((group, checkedId) -> changeSkuWithRule());
});
changeSkuWithRule
();
}
private
void
clearSelected
(
ViewGroup
group
)
{
if
(
group
.
getChildCount
()
<=
0
)
{
return
;
}
for
(
int
i
=
0
;
i
<
group
.
getChildCount
();
i
++)
{
View
v
=
group
.
getChildAt
(
i
);
v
.
setSelected
(
false
);
if
(
v
instanceof
ViewGroup
)
{
clearSelected
((
ViewGroup
)
v
);
}
}
}
private
void
changeSkuWithRule
()
{
if
(
layoutSpecs
.
getChildCount
()
<=
0
)
{
return
;
...
...
@@ -187,12 +218,12 @@ public class GoodsDetailDialog extends Dialog {
List
<
GoodsRule
>
rules
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
layoutSpecs
.
getChildCount
();
i
++)
{
View
v
=
layoutSpecs
.
getChildAt
(
i
);
RadioGroup
group
=
v
.
findViewById
(
R
.
id
.
group_spec
);
RadioButton
button
=
group
.
findViewById
(
group
.
getCheckedRadioButtonId
()
);
if
(
button
==
null
)
{
LinearLayout
layoutRules
=
(
LinearLayout
)
v
.
findViewById
(
R
.
id
.
layout_rules
);
View
view
=
getSelectedView
(
layoutRules
);
if
(
view
==
null
)
{
continue
;
}
rules
.
add
((
GoodsRule
)
button
.
getTag
());
rules
.
add
((
GoodsRule
)
view
.
getTag
());
}
checkSku
=
matchSku
(
rules
);
if
(
checkSku
==
null
)
{
...
...
@@ -203,6 +234,19 @@ public class GoodsDetailDialog extends Dialog {
txtDiscount
.
setText
(
String
.
valueOf
(
checkSku
.
getDiscount
()));
}
private
View
getSelectedView
(
LinearLayout
layoutRules
)
{
if
(
layoutRules
.
getChildCount
()
<=
0
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
layoutRules
.
getChildCount
();
i
++)
{
View
v
=
layoutRules
.
getChildAt
(
i
);
if
(
v
.
isSelected
())
{
return
v
;
}
}
return
null
;
}
private
Sku
matchSku
(
List
<
GoodsRule
>
rules
)
{
if
(
CollectionUtils
.
isEmpty
(
rules
))
{
return
null
;
...
...
app/src/main/res/drawable/bg_spec_recommend.xml
0 → 100644
View file @
daa586fa
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/rule_recommend_corners"
/>
<solid
android:width=
"1dp"
android:color=
"@color/colorPink"
/>
</shape>
</item>
</layer-list>
app/src/main/res/drawable/ic_baseline_delete_outline_24.xml
deleted
100644 → 0
View file @
4b8660af
<vector
android:height=
"18dp"
android:tint=
"#999999"
android:viewportHeight=
"24"
android:viewportWidth=
"24"
android:width=
"18dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8,9h8v10L8,19L8,9zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"
/>
</vector>
app/src/main/res/drawable/sel_butn_check.xml
View file @
daa586fa
...
...
@@ -2,5 +2,5 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
>
<item
android:drawable=
"@mipmap/duigou_2x"
android:state_checked=
"true"
/>
<item
android:drawable=
"@mipmap/duigou_2x"
android:state_selected=
"true"
/>
<item
android:drawable=
"@mipmap/
duigou
_2x"
/>
<item
android:drawable=
"@mipmap/
weixuanzhong
_2x"
/>
</selector>
app/src/main/res/layout/activity_launcher.xml
View file @
daa586fa
...
...
@@ -11,21 +11,24 @@
android:id=
"@+id/rec_recommend"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"7"
/>
android:layout_weight=
"7"
android:descendantFocusability=
"afterDescendants"
/>
<FrameLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/padding10"
android:layout_weight=
"4.5"
>
<androidx.recyclerview.widget.RecyclerView
android:paddingTop=
"@dimen/padding20"
android:id=
"@+id/rec_right"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
android:descendantFocusability=
"afterDescendants"
android:paddingTop=
"@dimen/padding20"
/>
</FrameLayout>
<ScrollView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:descendantFocusability=
"afterDescendants"
android:scrollbars=
"none"
>
<RadioGroup
android:id=
"@+id/group_category"
...
...
app/src/main/res/layout/activity_settings.xml
View file @
daa586fa
...
...
@@ -8,6 +8,7 @@
<ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:descendantFocusability=
"afterDescendants"
android:scrollbars=
"none"
>
<LinearLayout
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/item_goods.xml
View file @
daa586fa
...
...
@@ -22,7 +22,8 @@
android:layout_height=
"@dimen/ic_recommend"
android:layout_alignParentEnd=
"true"
android:layout_margin=
"@dimen/padding5"
android:src=
"@mipmap/aixin_2x"
/>
android:src=
"@mipmap/aixin_2x"
android:visibility=
"gone"
/>
</RelativeLayout>
<LinearLayout
android:id=
"@+id/layout_right"
...
...
@@ -61,37 +62,42 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/padding3"
>
<
Image
View
android:id=
"@+id/i
mg
_price"
android:layout_width=
"
@dimen/ic_price
"
android:layout_height=
"
@dimen/ic_price
"
<
Text
View
android:id=
"@+id/i
co
_price"
android:layout_width=
"
wrap_content
"
android:layout_height=
"
wrap_content
"
android:layout_alignParentBottom=
"true"
android:src=
"@drawable/ms__arrow"
/>
android:src=
"@drawable/ms__arrow"
android:text=
"¥"
android:textColor=
"@color/textRed"
android:textSize=
"@dimen/ts_goods_item_price"
/>
<TextView
android:id=
"@+id/txt_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_toRightOf=
"@id/i
mg
_price"
android:layout_toRightOf=
"@id/i
co
_price"
android:text=
"19.9"
android:textColor=
"@color/textRed"
android:textSize=
"@dimen/ts_goods_item_price"
android:textStyle=
"bold"
/>
<
Image
View
android:id=
"@+id/i
mg
_discount"
android:layout_width=
"
@dimen/ic_discou
nt"
android:layout_height=
"
@dimen/ic_discou
nt"
<
Text
View
android:id=
"@+id/i
co
_discount"
android:layout_width=
"
wrap_conte
nt"
android:layout_height=
"
wrap_conte
nt"
android:layout_alignParentBottom=
"true"
android:layout_marginStart=
"@dimen/padding5"
android:layout_toEndOf=
"@id/txt_price"
android:src=
"@drawable/ms__arrow"
/>
android:text=
"¥"
android:textColor=
"@color/textSecondPrimary"
android:textSize=
"@dimen/ts_goods_item_discount"
/>
<TextView
android:id=
"@+id/txt_discount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_toEndOf=
"@id/i
mg
_discount"
android:layout_toEndOf=
"@id/i
co
_discount"
android:text=
"29.9"
android:textColor=
"@color/textSecondPrimary"
android:textSize=
"@dimen/ts_goods_item_discount"
/>
...
...
app/src/main/res/layout/item_spec.xml
View file @
daa586fa
...
...
@@ -12,8 +12,8 @@
android:textColor=
"@color/textPrimary"
android:textSize=
"@dimen/ts_detail_spec"
android:textStyle=
"bold"
/>
<
RadioGroup
android:id=
"@+id/
group_spec
"
<
LinearLayout
android:id=
"@+id/
layout_rules
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/spec_rule_margin"
...
...
app/src/main/res/layout/item_spec_rule.xml
View file @
daa586fa
<?xml version="1.0" encoding="utf-8"?>
<
RadioButton
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/butn_rule
"
<
androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/padding10"
android:background=
"@drawable/sel_spec_bg"
android:button=
"@null"
android:paddingHorizontal=
"@dimen/padding10"
android:paddingVertical=
"@dimen/rule_vertical_padding"
android:singleLine=
"true"
android:textColor=
"@drawable/sel_spec_color"
android:textSize=
"@dimen/ts_detail_rule"
/>
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/butn_rule"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/padding5"
android:layout_marginEnd=
"@dimen/padding10"
android:background=
"@drawable/sel_spec_bg"
android:paddingHorizontal=
"@dimen/padding10"
android:paddingVertical=
"@dimen/rule_vertical_padding"
android:singleLine=
"true"
android:text=
"加糖"
android:textColor=
"@drawable/sel_spec_color"
android:textSize=
"@dimen/ts_detail_rule"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/txt_recommend"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_spec_recommend"
android:paddingHorizontal=
"@dimen/padding5"
android:paddingVertical=
"@dimen/padding3"
android:text=
"推荐"
android:textColor=
"@color/white"
android:textSize=
"@dimen/ts_detail_spec_rec"
android:visibility=
"gone"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/item_spec_rule_recommend.xml
0 → 100644
View file @
daa586fa
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/txt_recommend"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_spec_recommend"
android:paddingHorizontal=
"@dimen/padding5"
android:paddingVertical=
"@dimen/padding3"
android:text=
"推荐"
android:textColor=
"@color/white"
android:textSize=
"@dimen/ts_detail_spec_rec"
/>
app/src/main/res/layout/item_trolley.xml
View file @
daa586fa
...
...
@@ -49,10 +49,13 @@
android:layout_marginTop=
"@dimen/padding5"
android:gravity=
"bottom"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"@dimen/ic_price"
android:layout_height=
"@dimen/ic_price"
android:src=
"@drawable/ms__arrow"
/>
<TextView
android:id=
"@+id/ico_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"¥"
android:textColor=
"@color/textRed"
android:textSize=
"@dimen/ts_goods_item_price"
/>
<TextView
android:id=
"@+id/txt_price"
android:layout_width=
"wrap_content"
...
...
@@ -61,12 +64,14 @@
android:textColor=
"@color/textRed"
android:textSize=
"@dimen/ts_goods_item_price"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"
@dimen/ic_discou
nt"
android:layout_height=
"
@dimen/ic_discou
nt"
<TextView
android:id=
"@+id/ico_discount"
android:layout_width=
"
wrap_conte
nt"
android:layout_height=
"
wrap_conte
nt"
android:layout_marginStart=
"@dimen/padding5"
android:src=
"@drawable/ms__arrow"
/>
android:text=
"¥"
android:textColor=
"@color/textSecondPrimary"
android:textSize=
"@dimen/ts_goods_item_discount"
/>
<TextView
android:id=
"@+id/txt_discount"
android:layout_width=
"0dp"
...
...
app/src/main/res/layout/view_goods_detail.xml
View file @
daa586fa
...
...
@@ -71,10 +71,13 @@
android:layout_weight=
"1"
android:gravity=
"bottom"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"@dimen/ic_detail_price"
android:layout_height=
"@dimen/ic_detail_price"
android:src=
"@drawable/ms__arrow"
/>
<TextView
android:id=
"@+id/ico_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"¥"
android:textColor=
"@color/textRed"
android:textSize=
"@dimen/ts_detail_price"
/>
<TextView
android:id=
"@+id/txt_price"
android:layout_width=
"wrap_content"
...
...
@@ -85,11 +88,14 @@
android:textSize=
"@dimen/ts_detail_price"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"@dimen/ic_detail_discount"
android:layout_height=
"@dimen/ic_detail_discount"
<TextView
android:id=
"@+id/ico_discount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/padding5"
android:src=
"@drawable/ms__arrow"
/>
android:text=
"¥"
android:textColor=
"@color/textSecondPrimary"
android:textSize=
"@dimen/ts_detail_discount"
/>
<TextView
android:id=
"@+id/txt_discount"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/view_trolley.xml
View file @
daa586fa
...
...
@@ -21,8 +21,8 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:
padding=
"@dimen/padding10
"
android:
orientation=
"horizontal
"
>
android:
orientation=
"horizontal
"
android:
padding=
"@dimen/padding10
"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
...
...
@@ -36,7 +36,7 @@
android:layout_width=
"@dimen/ic_clear_size"
android:layout_height=
"@dimen/ic_clear_size"
android:layout_marginStart=
"@dimen/padding5"
android:src=
"@
drawable/ic_baseline_delete_outline_24
"
/>
android:src=
"@
mipmap/lajitong_2x
"
/>
<Button
android:id=
"@+id/butn_clear"
android:layout_width=
"wrap_content"
...
...
@@ -55,6 +55,7 @@
android:id=
"@+id/list_trolley"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/trolley_item_height"
android:descendantFocusability=
"afterDescendants"
android:divider=
"@null"
/>
<ImageView
android:layout_width=
"match_parent"
...
...
@@ -84,8 +85,8 @@
android:layout_width=
"@dimen/trolley_count_size"
android:layout_height=
"@dimen/trolley_count_size"
android:layout_alignParentEnd=
"true"
android:background=
"@drawable/ic_dot"
android:layout_margin=
"@dimen/padding7"
android:background=
"@drawable/ic_dot"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"@dimen/ts_trolley_count"
...
...
@@ -97,10 +98,13 @@
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"@dimen/ic_trolley_price"
android:layout_height=
"@dimen/ic_trolley_price"
android:src=
"@drawable/ms__menu_down"
/>
<TextView
android:id=
"@+id/ico_total"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"¥"
android:textColor=
"@color/textPrimary"
android:textSize=
"@dimen/ts_trolley_total"
/>
<TextView
android:id=
"@+id/txt_total"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/mipmap-xhdpi/jianhao_2x.png
View replaced file @
4b8660af
View file @
daa586fa
2.33 KB
|
W:
|
H:
2.67 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/mipmap-xhdpi/lajitong_2x.png
0 → 100644
View file @
daa586fa
1.03 KB
app/src/main/res/mipmap-xhdpi/weixuanzhong_2x.png
0 → 100644
View file @
daa586fa
2.35 KB
app/src/main/res/values-w1080dp/dimens.xml
View file @
daa586fa
...
...
@@ -27,6 +27,7 @@
<dimen
name=
"trolley_ic_size"
>
80dp
</dimen>
<dimen
name=
"trolley_ic_border_size"
>
120dp
</dimen>
<dimen
name=
"trolley_count_size"
>
30dp
</dimen>
<dimen
name=
"rule_recommend_corners"
>
5dp
</dimen>
<dimen
name=
"ic_recommend"
>
20dp
</dimen>
<dimen
name=
"ic_clear_size"
>
30dp
</dimen>
...
...
@@ -64,6 +65,7 @@
<dimen
name=
"ts_tips"
>
18sp
</dimen>
<dimen
name=
"ts_detail_name"
>
30sp
</dimen>
<dimen
name=
"ts_detail_spec"
>
24sp
</dimen>
<dimen
name=
"ts_detail_spec_rec"
>
12sp
</dimen>
<dimen
name=
"ts_detail_rule"
>
22sp
</dimen>
<dimen
name=
"ts_detail_count"
>
24sp
</dimen>
<dimen
name=
"ts_detail_price"
>
24sp
</dimen>
...
...
app/src/main/res/values/colors.xml
View file @
daa586fa
...
...
@@ -10,6 +10,7 @@
<color
name=
"textRed"
>
#FFFF001D
</color>
<color
name=
"white"
>
#FFFFFFFF
</color>
<color
name=
"black"
>
#FF000000
</color>
<color
name=
"colorPrimaryDark"
>
#00574B
</color>
<color
name=
"colorAccent"
>
#D81B60
</color>
<color
name=
"colorPrimaryDark"
>
#FF00574B
</color>
<color
name=
"colorAccent"
>
#FFD81B60
</color>
<color
name=
"colorPink"
>
#FFFF72C1
</color>
</resources>
app/src/main/res/values/dimens.xml
View file @
daa586fa
...
...
@@ -27,6 +27,7 @@
<dimen
name=
"trolley_ic_size"
>
40dp
</dimen>
<dimen
name=
"trolley_ic_border_size"
>
50dp
</dimen>
<dimen
name=
"trolley_count_size"
>
20dp
</dimen>
<dimen
name=
"rule_recommend_corners"
>
3dp
</dimen>
<dimen
name=
"ic_recommend"
>
10dp
</dimen>
<dimen
name=
"ic_clear_size"
>
15dp
</dimen>
...
...
@@ -40,7 +41,7 @@
<dimen
name=
"ic_detail_subtract_size"
>
20dp
</dimen>
<dimen
name=
"ic_detail_price"
>
15dp
</dimen>
<dimen
name=
"ic_detail_discount"
>
10dp
</dimen>
<dimen
name=
"ic_dialog_close"
>
3
0dp
</dimen>
<dimen
name=
"ic_dialog_close"
>
2
0dp
</dimen>
<dimen
name=
"ic_trolley_price"
>
30dp
</dimen>
<dimen
name=
"ic_scan_succ"
>
40dp
</dimen>
<dimen
name=
"ic_scan_wx"
>
20dp
</dimen>
...
...
@@ -64,6 +65,7 @@
<dimen
name=
"ts_tips"
>
9sp
</dimen>
<dimen
name=
"ts_detail_name"
>
20sp
</dimen>
<dimen
name=
"ts_detail_spec"
>
14sp
</dimen>
<dimen
name=
"ts_detail_spec_rec"
>
6sp
</dimen>
<dimen
name=
"ts_detail_rule"
>
12sp
</dimen>
<dimen
name=
"ts_detail_count"
>
14sp
</dimen>
<dimen
name=
"ts_detail_price"
>
14sp
</dimen>
...
...
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