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
38ef74aa
Commit
38ef74aa
authored
Jan 18, 2018
by
陈前
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印
parent
b3488c68
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
219 additions
and
28 deletions
+219
-28
app/src/main/java/com/xingdata/zzdpos/ui/marketing/marketingMenu/adapter/MarketingMenuAdapter.java
...marketing/marketingMenu/adapter/MarketingMenuAdapter.java
+12
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/RechargeListFragment.java
...zdpos/ui/statistics/fragment/ms/RechargeListFragment.java
+14
-1
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/UsedTicketListFragment.java
...pos/ui/statistics/fragment/ms/UsedTicketListFragment.java
+14
-1
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderListFragment.java
...zdpos/ui/statistics/fragment/order/OrderListFragment.java
+19
-6
app/src/main/java/com/xingdata/zzdpos/util/RecyclerViewUtil.java
.../main/java/com/xingdata/zzdpos/util/RecyclerViewUtil.java
+85
-2
app/src/main/java/com/xingdata/zzdpos/util/StatisticsCallback.java
...ain/java/com/xingdata/zzdpos/util/StatisticsCallback.java
+15
-0
app/src/main/res/drawable/item_string_head_bg.xml
app/src/main/res/drawable/item_string_head_bg.xml
+17
-0
app/src/main/res/drawable/red_border_thr_bigradius.xml
app/src/main/res/drawable/red_border_thr_bigradius.xml
+12
-0
app/src/main/res/layout/activity_error_dialog.xml
app/src/main/res/layout/activity_error_dialog.xml
+4
-4
app/src/main/res/layout/fragment_ms_list.xml
app/src/main/res/layout/fragment_ms_list.xml
+1
-0
app/src/main/res/layout/fragment_order_list.xml
app/src/main/res/layout/fragment_order_list.xml
+2
-1
app/src/main/res/layout/item_marketing_menu.xml
app/src/main/res/layout/item_marketing_menu.xml
+23
-3
app/src/main/res/layout/item_statistics.xml
app/src/main/res/layout/item_statistics.xml
+0
-9
app/src/main/res/layout/item_string_head.xml
app/src/main/res/layout/item_string_head.xml
+1
-1
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/marketing/marketingMenu/adapter/MarketingMenuAdapter.java
View file @
38ef74aa
...
@@ -27,56 +27,68 @@ public class MarketingMenuAdapter extends BaseAdapter<Integer, ItemMarketingMenu
...
@@ -27,56 +27,68 @@ public class MarketingMenuAdapter extends BaseAdapter<Integer, ItemMarketingMenu
switch
(
item
)
{
switch
(
item
)
{
case
C
.
MENU
.
MENU_MS_VIP_LEVEL
:
case
C
.
MENU
.
MENU_MS_VIP_LEVEL
:
titleId
=
R
.
string
.
menu_ms_vip_level
;
titleId
=
R
.
string
.
menu_ms_vip_level
;
mViewBinding
.
setIsShow
(
false
);
imgId
=
R
.
mipmap
.
vip_level
;
imgId
=
R
.
mipmap
.
vip_level
;
break
;
break
;
case
C
.
MENU
.
MENU_MS_INTEGRAL
:
case
C
.
MENU
.
MENU_MS_INTEGRAL
:
titleId
=
R
.
string
.
menu_ms_integral
;
titleId
=
R
.
string
.
menu_ms_integral
;
mViewBinding
.
setIsShow
(
false
);
imgId
=
R
.
mipmap
.
integral_rules
;
imgId
=
R
.
mipmap
.
integral_rules
;
break
;
break
;
case
C
.
MENU
.
MENU_MS_TICKET
:
case
C
.
MENU
.
MENU_MS_TICKET
:
titleId
=
R
.
string
.
menu_ms_ticket
;
titleId
=
R
.
string
.
menu_ms_ticket
;
mViewBinding
.
setIsShow
(
true
);
imgId
=
R
.
mipmap
.
ticker_setting
;
imgId
=
R
.
mipmap
.
ticker_setting
;
break
;
break
;
case
C
.
MENU
.
MENU_MS_RECHARGE
:
case
C
.
MENU
.
MENU_MS_RECHARGE
:
titleId
=
R
.
string
.
menu_ms_recharge
;
titleId
=
R
.
string
.
menu_ms_recharge
;
mViewBinding
.
setIsShow
(
true
);
imgId
=
R
.
mipmap
.
top_up_preferential
;
imgId
=
R
.
mipmap
.
top_up_preferential
;
break
;
break
;
case
C
.
MENU
.
MENU_MS_MS
:
case
C
.
MENU
.
MENU_MS_MS
:
titleId
=
R
.
string
.
menu_ms_ms
;
titleId
=
R
.
string
.
menu_ms_ms
;
mViewBinding
.
setIsShow
(
true
);
imgId
=
R
.
mipmap
.
marketing_plan
;
imgId
=
R
.
mipmap
.
marketing_plan
;
break
;
break
;
case
C
.
MENU
.
MENU_MS_SMS
:
case
C
.
MENU
.
MENU_MS_SMS
:
titleId
=
R
.
string
.
menu_ms_sms
;
titleId
=
R
.
string
.
menu_ms_sms
;
mViewBinding
.
setIsShow
(
false
);
imgId
=
R
.
mipmap
.
sms_all
;
imgId
=
R
.
mipmap
.
sms_all
;
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_OPER
:
{
case
C
.
MENU
.
MENU_MANAGER_OPER
:
{
titleId
=
R
.
string
.
menu_manager_oper
;
titleId
=
R
.
string
.
menu_manager_oper
;
mViewBinding
.
setIsShow
(
false
);
imgId
=
R
.
mipmap
.
ic_oper_setting
;
imgId
=
R
.
mipmap
.
ic_oper_setting
;
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_GOODS
:
{
case
C
.
MENU
.
MENU_MANAGER_GOODS
:
{
titleId
=
R
.
string
.
menu_manager_goods
;
titleId
=
R
.
string
.
menu_manager_goods
;
mViewBinding
.
setIsShow
(
false
);
imgId
=
R
.
mipmap
.
ic_goods_setting
;
imgId
=
R
.
mipmap
.
ic_goods_setting
;
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_BALE
:
{
case
C
.
MENU
.
MENU_MANAGER_BALE
:
{
titleId
=
R
.
string
.
menu_manager_bale
;
titleId
=
R
.
string
.
menu_manager_bale
;
mViewBinding
.
setIsShow
(
false
);
imgId
=
R
.
mipmap
.
ic_bale
;
imgId
=
R
.
mipmap
.
ic_bale
;
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_REPLENISHMENT
:
{
case
C
.
MENU
.
MENU_MANAGER_REPLENISHMENT
:
{
titleId
=
R
.
string
.
menu_manager_replenishment
;
titleId
=
R
.
string
.
menu_manager_replenishment
;
mViewBinding
.
setIsShow
(
false
);
imgId
=
R
.
mipmap
.
ic_replenishment
;
imgId
=
R
.
mipmap
.
ic_replenishment
;
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_OTHER
:
{
case
C
.
MENU
.
MENU_MANAGER_OTHER
:
{
titleId
=
R
.
string
.
menu_manager_other
;
titleId
=
R
.
string
.
menu_manager_other
;
mViewBinding
.
setIsShow
(
false
);
imgId
=
R
.
mipmap
.
ic_other_select
;
imgId
=
R
.
mipmap
.
ic_other_select
;
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_INVENTORY
:
{
case
C
.
MENU
.
MENU_MANAGER_INVENTORY
:
{
titleId
=
R
.
string
.
menu_manager_inventory
;
titleId
=
R
.
string
.
menu_manager_inventory
;
mViewBinding
.
setIsShow
(
false
);
imgId
=
R
.
mipmap
.
ic_inventory
;
imgId
=
R
.
mipmap
.
ic_inventory
;
}
}
break
;
break
;
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/RechargeListFragment.java
View file @
38ef74aa
...
@@ -8,6 +8,7 @@ import android.view.View;
...
@@ -8,6 +8,7 @@ import android.view.View;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentMsListBinding
;
import
com.xingdata.zzdpos.databinding.FragmentMsListBinding
;
...
@@ -16,6 +17,8 @@ import com.xingdata.zzdpos.model.VipRechargeOrder;
...
@@ -16,6 +17,8 @@ import com.xingdata.zzdpos.model.VipRechargeOrder;
import
com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsPresenter
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsPresenter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter
;
import
com.xingdata.zzdpos.util.RecyclerViewUtil
;
import
com.xingdata.zzdpos.util.StatisticsCallback
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -49,7 +52,17 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag
...
@@ -49,7 +52,17 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag
mStatisticsGroupAdapter
=
new
StatisticsRechargeGroupAdapter
(
new
ArrayList
<>());
mStatisticsGroupAdapter
=
new
StatisticsRechargeGroupAdapter
(
new
ArrayList
<>());
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsGroupAdapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsGroupAdapter
);
mViewBinding
.
statisticsRecycler
.
addItemDecoration
(
new
RecyclerViewUtil
.
StatisticsItemDecoration
(
getActivity
(),
2
,
getResources
().
getColor
(
R
.
color
.
gray_kongming
),
new
StatisticsCallback
()
{
@Override
public
SectionEntity
getItem
(
int
position
)
{
if
(
position
<
mStatisticsGroupAdapter
.
getData
().
size
()){
return
mStatisticsGroupAdapter
.
getData
().
get
(
position
);
}
else
{
return
null
;
}
}
}));
mStatisticsGroupAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
mStatisticsGroupAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
@Override
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/UsedTicketListFragment.java
View file @
38ef74aa
...
@@ -8,6 +8,7 @@ import android.view.View;
...
@@ -8,6 +8,7 @@ import android.view.View;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentMsListBinding
;
import
com.xingdata.zzdpos.databinding.FragmentMsListBinding
;
...
@@ -17,6 +18,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
...
@@ -17,6 +18,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import
com.xingdata.zzdpos.ui.statistics.StatisticsPresenter
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsPresenter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketGroupAdapter
;
import
com.xingdata.zzdpos.util.RecyclerViewUtil
;
import
com.xingdata.zzdpos.util.StatisticsCallback
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -50,7 +53,17 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr
...
@@ -50,7 +53,17 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsGroupAdapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsGroupAdapter
);
mViewBinding
.
statisticsRecycler
.
addItemDecoration
(
new
RecyclerViewUtil
.
StatisticsItemDecoration
(
getActivity
(),
2
,
getResources
().
getColor
(
R
.
color
.
gray_kongming
),
new
StatisticsCallback
()
{
@Override
public
SectionEntity
getItem
(
int
position
)
{
if
(
position
<
mStatisticsGroupAdapter
.
getData
().
size
())
{
return
mStatisticsGroupAdapter
.
getData
().
get
(
position
);
}
else
{
return
null
;
}
}
}));
mStatisticsGroupAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
mStatisticsGroupAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderListFragment.java
View file @
38ef74aa
...
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
...
@@ -24,6 +25,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
...
@@ -24,6 +25,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.RecyclerViewUtil
;
import
com.xingdata.zzdpos.util.StatisticsCallback
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -42,7 +45,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -42,7 +45,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
private
StatisticsOrderGroupAdapter
mStatisticsAdapter
;
private
StatisticsOrderGroupAdapter
mStatisticsAdapter
;
private
Long
monthDateStart
;
private
Long
monthDateStart
;
private
Long
monthDateEnd
;
private
Long
monthDateEnd
;
private
int
pagerNum
;
private
int
pagerNum
;
private
String
monthDate
;
private
String
monthDate
;
...
@@ -60,7 +63,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -60,7 +63,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
pagerNum
=
1
;
pagerNum
=
1
;
// Calendar calendar = Calendar.getInstance();
// Calendar calendar = Calendar.getInstance();
////获得当前时间的月份,月份从0开始所以结果要加1
////获得当前时间的月份,月份从0开始所以结果要加1
// int monthNow = calendar.get(Calendar.MONTH) + 1;
// int monthNow = calendar.get(Calendar.MONTH) + 1;
...
@@ -81,10 +84,20 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -81,10 +84,20 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
mViewBinding
.
tvEmpty
.
setText
(
R
.
string
.
statistics_search_empty
);
mViewBinding
.
tvEmpty
.
setText
(
R
.
string
.
statistics_search_empty
);
mStatisticsAdapter
=
new
StatisticsOrderGroupAdapter
(
new
ArrayList
<>());
mStatisticsAdapter
=
new
StatisticsOrderGroupAdapter
(
new
ArrayList
<>());
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
mViewBinding
.
statisticsRecycler
.
addItemDecoration
(
new
RecyclerViewUtil
.
StatisticsItemDecoration
(
getActivity
(),
2
,
getResources
().
getColor
(
R
.
color
.
gray_kongming
),
new
StatisticsCallback
()
{
@Override
public
SectionEntity
getItem
(
int
position
)
{
if
(
position
<
mStatisticsAdapter
.
getData
().
size
()){
return
mStatisticsAdapter
.
getData
().
get
(
position
);
}
else
{
return
null
;
}
}
}));
mStatisticsAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
mStatisticsAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
...
...
app/src/main/java/com/xingdata/zzdpos/util/RecyclerViewUtil.java
View file @
38ef74aa
...
@@ -9,6 +9,9 @@ import android.graphics.drawable.Drawable;
...
@@ -9,6 +9,9 @@ import android.graphics.drawable.Drawable;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.View
;
import
android.view.View
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsDetailContract
;
public
class
RecyclerViewUtil
{
public
class
RecyclerViewUtil
{
public
static
class
GridSpacingItemDecoration
extends
RecyclerView
.
ItemDecoration
{
public
static
class
GridSpacingItemDecoration
extends
RecyclerView
.
ItemDecoration
{
...
@@ -82,12 +85,14 @@ public class RecyclerViewUtil {
...
@@ -82,12 +85,14 @@ public class RecyclerViewUtil {
mDividerHight
=
dividerHight
;
mDividerHight
=
dividerHight
;
mDividerDarwable
=
dividerDrawable
;
mDividerDarwable
=
dividerDrawable
;
}
}
public
ListCardItemDecoration
(
Context
context
,
int
dividerHight
,
Drawable
dividerDrawable
,
int
noNum
)
{
public
ListCardItemDecoration
(
Context
context
,
int
dividerHight
,
Drawable
dividerDrawable
,
int
noNum
)
{
this
(
context
);
this
(
context
);
mDividerHight
=
dividerHight
;
mDividerHight
=
dividerHight
;
mDividerDarwable
=
dividerDrawable
;
mDividerDarwable
=
dividerDrawable
;
this
.
noNum
=
noNum
;
this
.
noNum
=
noNum
;
}
}
@Override
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
super
.
getItemOffsets
(
outRect
,
view
,
parent
,
state
);
super
.
getItemOffsets
(
outRect
,
view
,
parent
,
state
);
...
@@ -125,6 +130,84 @@ public class RecyclerViewUtil {
...
@@ -125,6 +130,84 @@ public class RecyclerViewUtil {
}
}
}
}
}
public
static
class
StatisticsItemDecoration
extends
RecyclerView
.
ItemDecoration
{
private
Drawable
mDividerDarwable
;
private
StatisticsCallback
mStatisticsCallback
;
private
int
mDividerHight
=
1
;
private
Paint
mColorPaint
;
public
final
int
[]
ATRRS
=
new
int
[]{
android
.
R
.
attr
.
listDivider
};
public
StatisticsItemDecoration
(
Context
context
)
{
final
TypedArray
ta
=
context
.
obtainStyledAttributes
(
ATRRS
);
this
.
mDividerDarwable
=
ta
.
getDrawable
(
0
);
ta
.
recycle
();
}
/*
int dividerHight 分割线的线宽
int dividerColor 分割线的颜色
*/
public
StatisticsItemDecoration
(
Context
context
,
int
dividerHight
,
int
dividerColor
,
StatisticsCallback
statisticsCallback
)
{
this
(
context
);
mDividerHight
=
dividerHight
;
mColorPaint
=
new
Paint
();
mColorPaint
.
setColor
(
dividerColor
);
this
.
mStatisticsCallback
=
statisticsCallback
;
}
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
super
.
getItemOffsets
(
outRect
,
view
,
parent
,
state
);
outRect
.
bottom
=
0
;
}
@Override
public
void
onDraw
(
Canvas
c
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
super
.
onDraw
(
c
,
parent
,
state
);
//画水平和垂直分割线
drawHorizontalDivider
(
c
,
parent
);
}
public
void
drawHorizontalDivider
(
Canvas
c
,
RecyclerView
parent
)
{
final
int
childCount
=
parent
.
getChildCount
();
for
(
int
i
=
0
;
i
<
childCount
;
i
++)
{
final
View
child
=
parent
.
getChildAt
(
i
);
RecyclerView
.
LayoutParams
params
=
(
RecyclerView
.
LayoutParams
)
child
.
getLayoutParams
();
int
position
=
parent
.
getChildAdapterPosition
(
child
);
SectionEntity
sectionEntity
=
mStatisticsCallback
.
getItem
(
position
);
if
(
sectionEntity
!=
null
)
{
if
(!
sectionEntity
.
isHeader
)
{
final
int
left
=
child
.
getLeft
()
-
params
.
leftMargin
-
mDividerHight
+
200
;
final
int
right
=
child
.
getRight
()
+
params
.
rightMargin
;
int
top
=
0
;
int
bottom
=
0
;
top
=
child
.
getBottom
()
+
params
.
bottomMargin
+
2
;
bottom
=
top
+
mDividerHight
;
//画分割线
mDividerDarwable
.
setBounds
(
left
,
top
,
right
,
bottom
);
mDividerDarwable
.
draw
(
c
);
if
(
mColorPaint
!=
null
)
{
c
.
drawRect
(
left
,
top
,
right
,
bottom
,
mColorPaint
);
}
}
}
}
}
}
}
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/util/StatisticsCallback.java
0 → 100644
View file @
38ef74aa
package
com
.
xingdata
.
zzdpos
.
util
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
/**
* Created by Administrator on 2018/1/18.
*/
public
interface
StatisticsCallback
{
SectionEntity
getItem
(
int
position
);
}
app/src/main/res/drawable/item_string_head_bg.xml
0 → 100644
View file @
38ef74aa
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape>
<solid
android:color=
"@color/gray_huanggai"
/>
</shape>
</item>
<item
android:bottom=
"0.5dp"
android:top=
"0.5dp"
>
<shape>
<solid
android:color=
"@color/gray_zhouyu"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/drawable/red_border_thr_bigradius.xml
0 → 100644
View file @
38ef74aa
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"1000dp"
/>
<stroke
android:width=
"0.5dp"
android:color=
"@color/red_guanyu"
/>
<solid
android:color=
"@color/all_transparent"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_error_dialog.xml
View file @
38ef74aa
...
@@ -22,15 +22,15 @@
...
@@ -22,15 +22,15 @@
</data>
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"
400dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"
450dp
"
android:layout_height=
"
wrap_content
"
android:background=
"@color/transparent"
android:background=
"@color/transparent"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
android:layout_width=
"
45
0dp"
android:layout_width=
"
30
0dp"
android:layout_height=
"
45
0dp"
android:layout_height=
"
30
0dp"
android:background=
"@color/white"
android:background=
"@color/white"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
...
app/src/main/res/layout/fragment_ms_list.xml
View file @
38ef74aa
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
android:id=
"@+id/statistics_recycler"
android:id=
"@+id/statistics_recycler"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white_caocao"
android:visibility=
"gone"
>
android:visibility=
"gone"
>
...
...
app/src/main/res/layout/fragment_order_list.xml
View file @
38ef74aa
...
@@ -24,9 +24,9 @@
...
@@ -24,9 +24,9 @@
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<View
<View
android:layout_alignParentTop=
"true"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:layout_height=
"@dimen/view_line_L050"
android:layout_alignParentTop=
"true"
android:background=
"@color/gray_huanggai"
/>
android:background=
"@color/gray_huanggai"
/>
<!--<LinearLayout-->
<!--<LinearLayout-->
...
@@ -68,6 +68,7 @@
...
@@ -68,6 +68,7 @@
android:id=
"@+id/statistics_recycler"
android:id=
"@+id/statistics_recycler"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white_caocao"
android:visibility=
"gone"
>
android:visibility=
"gone"
>
...
...
app/src/main/res/layout/item_marketing_menu.xml
View file @
38ef74aa
...
@@ -2,7 +2,10 @@
...
@@ -2,7 +2,10 @@
<layout>
<layout>
<data>
<data>
<import
type=
"android.view.View"
/>
<variable
name=
"isShow"
type=
"Boolean"
/>
</data>
</data>
...
@@ -25,9 +28,9 @@
...
@@ -25,9 +28,9 @@
android:src=
"@mipmap/right"
/>
android:src=
"@mipmap/right"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"
match_par
ent"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_
toLeftOf=
"@+id/iv
"
android:layout_
alignParentStart=
"true
"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingStart=
"@dimen/all_bounced_padding"
android:paddingStart=
"@dimen/all_bounced_padding"
android:paddingTop=
"@dimen/all_padding"
>
android:paddingTop=
"@dimen/all_padding"
>
...
@@ -49,6 +52,23 @@
...
@@ -49,6 +52,23 @@
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<TextView
android:visibility=
"@{isShow? View.VISIBLE: View.GONE}"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_toLeftOf=
"@+id/iv"
android:textColor=
"@color/red_guanyu"
android:text=
"高级功能"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_centerVertical=
"true"
android:textSize=
"@dimen/all_text_size_small"
android:paddingTop=
"@dimen/dp_4"
android:paddingBottom=
"@dimen/dp_4"
android:paddingEnd=
"@dimen/all_bounced_padding"
android:paddingStart=
"@dimen/all_bounced_padding"
android:background=
"@drawable/red_border_thr_bigradius"
/>
<View
<View
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:layout_height=
"@dimen/view_line_L050"
...
...
app/src/main/res/layout/item_statistics.xml
View file @
38ef74aa
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
<android.support.constraint.ConstraintLayout
<android.support.constraint.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/item_statistics_height"
android:layout_height=
"@dimen/item_statistics_height"
android:background=
"@color/white_caocao"
android:foreground=
"?android:attr/selectableItemBackground"
>
android:foreground=
"?android:attr/selectableItemBackground"
>
<com.facebook.drawee.view.SimpleDraweeView
<com.facebook.drawee.view.SimpleDraweeView
...
@@ -65,14 +64,6 @@
...
@@ -65,14 +64,6 @@
android:textSize=
"@dimen/all_text_size_small_small"
android:textSize=
"@dimen/all_text_size_small_small"
app:layout_constraintBottom_toBottomOf=
"@id/img_left"
app:layout_constraintBottom_toBottomOf=
"@id/img_left"
app:layout_constraintStart_toEndOf=
"@id/img_left"
/>
app:layout_constraintStart_toEndOf=
"@id/img_left"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"@dimen/view_line_L1"
android:background=
"@color/gray_zhouyu"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/img_left"
/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</layout>
</layout>
...
...
app/src/main/res/layout/item_string_head.xml
View file @
38ef74aa
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/
singleline_zhouyu_huanggai
"
android:background=
"@drawable/
item_string_head_bg
"
android:gravity=
"left"
android:gravity=
"left"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingStart=
"@dimen/all_bounced_padding"
android:paddingStart=
"@dimen/all_bounced_padding"
...
...
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