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
42f41ee5
Commit
42f41ee5
authored
Jan 03, 2018
by
姜敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加颜色
parent
aca816ff
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
590 additions
and
338 deletions
+590
-338
app/src/main/java/com/xingdata/zzdpos/ui/vip/VipActivity.java
...src/main/java/com/xingdata/zzdpos/ui/vip/VipActivity.java
+7
-14
app/src/main/java/com/xingdata/zzdpos/ui/vip/VipContract.java
...src/main/java/com/xingdata/zzdpos/ui/vip/VipContract.java
+2
-2
app/src/main/java/com/xingdata/zzdpos/ui/vip/VipPresenter.java
...rc/main/java/com/xingdata/zzdpos/ui/vip/VipPresenter.java
+11
-11
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipExpenseListFragment.java
...ngdata/zzdpos/ui/vip/fragment/VipExpenseListFragment.java
+7
-0
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipFragment.java
...java/com/xingdata/zzdpos/ui/vip/fragment/VipFragment.java
+170
-0
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipInfoFragment.java
.../com/xingdata/zzdpos/ui/vip/fragment/VipInfoFragment.java
+95
-13
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipListFragment.java
.../com/xingdata/zzdpos/ui/vip/fragment/VipListFragment.java
+0
-91
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipTitleFragment.java
...com/xingdata/zzdpos/ui/vip/fragment/VipTitleFragment.java
+0
-39
app/src/main/res/layout/activity_vip.xml
app/src/main/res/layout/activity_vip.xml
+1
-20
app/src/main/res/layout/fragment_vip.xml
app/src/main/res/layout/fragment_vip.xml
+177
-0
app/src/main/res/layout/fragment_vip_info.xml
app/src/main/res/layout/fragment_vip_info.xml
+105
-13
app/src/main/res/layout/fragment_vip_list.xml
app/src/main/res/layout/fragment_vip_list.xml
+1
-9
app/src/main/res/layout/fragment_viplevel_title.xml
app/src/main/res/layout/fragment_viplevel_title.xml
+1
-6
app/src/main/res/layout/fragment_viptitle.xml
app/src/main/res/layout/fragment_viptitle.xml
+0
-119
app/src/main/res/mipmap-xhdpi/ic_expand.9.png
app/src/main/res/mipmap-xhdpi/ic_expand.9.png
+0
-0
app/src/main/res/mipmap-xhdpi/radiobutton_checked.9.png
app/src/main/res/mipmap-xhdpi/radiobutton_checked.9.png
+0
-0
app/src/main/res/mipmap-xhdpi/radiobutton_normal.9.png
app/src/main/res/mipmap-xhdpi/radiobutton_normal.9.png
+0
-0
app/src/main/res/values/styles.xml
app/src/main/res/values/styles.xml
+13
-1
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/vip/VipActivity.java
View file @
42f41ee5
package
com
.
xingdata
.
zzdpos
.
ui
.
vip
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.databinding.ActivityVipBinding
;
import
com.xingdata.zzdpos.model.Level
;
import
com.xingdata.zzdpos.model.Pager
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipFragment
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipInfoFragment
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipLevleFragment
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipListFragment
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipTitleFragment
;
import
com.xingdata.zzdpos.util.OnClickListener
;
public
class
VipActivity
extends
BaseActivity
<
VipPresenter
,
ActivityVipBinding
>
implements
VipContract
.
View
{
...
...
@@ -23,31 +19,28 @@ public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding>
@Override
public
void
initView
()
{
loadRootFragment
(
R
.
id
.
vip_list_frame
,
mPresenter
.
vipListFragment
,
false
,
false
);
loadRootFragment
(
R
.
id
.
vip_level_frame
,
mPresenter
.
vipLevleFragment
,
false
,
false
);
loadRootFragment
(
R
.
id
.
vip_title_frame
,
mPresenter
.
vipTitleFragment
,
false
,
false
);
loadRootFragment
(
R
.
id
.
vip_frame
,
new
VipFragment
(),
true
,
false
);
}
@Override
public
void
addVip
()
{
start
(
mPresenter
.
vipFragment
);
}
@Override
public
String
addVipSus
()
{
public
String
addVipSus
(
Vip
vip
)
{
return
null
;
}
@Override
public
void
getVipLevelSus
(
Pager
<
Level
>
levelPager
)
{
mPresenter
.
vip
Levle
Fragment
.
getVipLevelSus
(
levelPager
);
mPresenter
.
vipFragment
.
getVipLevelSus
(
levelPager
);
}
@Override
public
void
getVipListSus
(
Pager
<
Vip
>
vipPager
,
int
pageNumber
)
{
mPresenter
.
vip
ListFragment
.
getVipListSus
(
vipPager
,
pageNumber
);
public
void
getVipListSus
(
Pager
<
Vip
>
vipPager
,
int
pageNumber
)
{
mPresenter
.
vip
Fragment
.
getVipListSus
(
vipPager
,
pageNumber
);
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/vip/VipContract.java
View file @
42f41ee5
...
...
@@ -12,7 +12,7 @@ public interface VipContract {
interface
View
extends
BaseView
{
void
addVip
();
String
addVipSus
();
String
addVipSus
(
Vip
vip
);
void
getVipLevelSus
(
Pager
<
Level
>
levelPager
);
...
...
@@ -30,6 +30,6 @@ public interface VipContract {
public
abstract
void
getVipNumber
();
public
abstract
void
addVip
();
public
abstract
void
addVip
(
Vip
vip
);
}
}
\ No newline at end of file
app/src/main/java/com/xingdata/zzdpos/ui/vip/VipPresenter.java
View file @
42f41ee5
...
...
@@ -3,17 +3,13 @@ package com.xingdata.zzdpos.ui.vip;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipExpenseListFragment
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipFragment
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipInfoFragment
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipLevleFragment
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipListFragment
;
import
com.xingdata.zzdpos.ui.vip.fragment.VipTitleFragment
;
public
class
VipPresenter
extends
VipContract
.
Presenter
{
public
VipFragment
vipFragment
=
new
VipFragment
();
public
VipInfoFragment
vipInfoFragment
=
new
VipInfoFragment
();
public
VipListFragment
vipListFragment
=
new
VipListFragment
();
public
VipLevleFragment
vipLevleFragment
=
new
VipLevleFragment
();
public
VipTitleFragment
vipTitleFragment
=
new
VipTitleFragment
();
@Override
public
void
onAttached
()
{
...
...
@@ -22,8 +18,8 @@ public class VipPresenter extends VipContract.Presenter {
@Override
public
void
getVipList
(
int
pageNumber
,
String
vipLevel
)
{
ApiFactory
.
User
.
getVipList
(
pageNumber
,
vipLevel
).
subscribe
(
vipPager
->
{
mView
.
getVipListSus
(
vipPager
,
pageNumber
);
ApiFactory
.
User
.
getVipList
(
pageNumber
,
vipLevel
).
subscribe
(
vipPager
->
{
mView
.
getVipListSus
(
vipPager
,
pageNumber
);
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
...
...
@@ -46,7 +42,11 @@ public class VipPresenter extends VipContract.Presenter {
}
@Override
public
void
addVip
()
{
mView
.
addVip
();
public
void
addVip
(
Vip
vip
)
{
ApiFactory
.
User
.
addVip
(
vip
).
subscribe
(
mVip
->
{
mView
.
addVipSus
(
mVip
);
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
}
}
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipExpenseListFragment.java
View file @
42f41ee5
...
...
@@ -4,6 +4,7 @@ package com.xingdata.zzdpos.ui.vip.fragment;
* Created by JM_DEV on 2017/12/21.
*/
import
android.annotation.SuppressLint
;
import
android.support.v7.widget.LinearLayoutManager
;
import
com.blankj.utilcode.util.ToastUtils
;
...
...
@@ -11,6 +12,7 @@ import com.xingdata.zzdpos.R;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentVipExpenseListBinding
;
import
com.xingdata.zzdpos.model.Level
;
import
com.xingdata.zzdpos.model.VipRechargeOrder
;
import
com.xingdata.zzdpos.ui.vip.VipPresenter
;
import
com.xingdata.zzdpos.ui.vip.adapter.VipRechargeAdapter
;
...
...
@@ -22,9 +24,12 @@ import java.util.List;
/**
* 会员消费记录
*/
@SuppressLint
(
"ValidFragment"
)
public
class
VipExpenseListFragment
extends
BaseFragment
<
VipPresenter
,
FragmentVipExpenseListBinding
>
{
private
VipRechargeAdapter
vipRechargeAdapter
;
private
List
<
VipRechargeOrder
>
orders
=
new
ArrayList
<>();
private
List
<
Level
>
levels
=
null
;
@Override
public
int
getLayoutId
()
{
...
...
@@ -67,4 +72,6 @@ public class VipExpenseListFragment extends BaseFragment<VipPresenter, FragmentV
pop
();
return
true
;
}
}
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/Vip
Levle
Fragment.java
→
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipFragment.java
View file @
42f41ee5
...
...
@@ -5,54 +5,86 @@ package com.xingdata.zzdpos.ui.vip.fragment;
*/
import
android.annotation.SuppressLint
;
import
android.graphics.Color
;
import
android.graphics.drawable.ColorDrawable
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.view.Gravity
;
import
android.widget.GridView
;
import
android.widget.LinearLayout
;
import
android.widget.RadioButton
;
import
android.widget.RadioGroup
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentVip
levelTitle
Binding
;
import
com.xingdata.zzdpos.databinding.FragmentVipBinding
;
import
com.xingdata.zzdpos.model.Level
;
import
com.xingdata.zzdpos.model.Pager
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.vip.VipActivity
;
import
com.xingdata.zzdpos.ui.vip.VipContract
;
import
com.xingdata.zzdpos.ui.vip.VipPresenter
;
import
com.xingdata.zzdpos.ui.vip.adapter.VipListAdapter
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 会员
等级列表
* 会员
信息界面
*/
public
class
VipLevleFragment
extends
BaseFragment
<
VipPresenter
,
FragmentViplevelTitleBinding
>
{
public
class
VipFragment
extends
BaseFragment
<
VipPresenter
,
FragmentVipBinding
>
{
private
VipListAdapter
vipListAdapter
;
private
List
<
Vip
>
vips
=
new
ArrayList
<>();
private
List
<
Level
>
levels
=
null
;
private
int
pageNumber
=
0
;
private
String
strVipLevle
;
private
RadioGroup
radioGroup
=
mViewBinding
.
vipLevelR
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_vip
level_title
;
return
R
.
layout
.
fragment_vip
;
}
@Override
public
void
initView
()
{
vipListAdapter
=
new
VipListAdapter
(
getActivity
(),
vips
);
mViewBinding
.
vipRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
vipRecyclerView
.
setAdapter
(
vipListAdapter
);
mViewBinding
.
vipRefresh
.
setOnRefreshListener
(
this
::
onRefresh
);
vipListAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
toStartVipInfo
(
vipListAdapter
.
getData
().
get
(
position
));
});
vipListAdapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
vipRecyclerView
);
vipListAdapter
.
setEnableLoadMore
(
true
);
mViewBinding
.
titleSearch
.
onBack
.
setOnClickListener
(
view
->
{
getActivity
().
finish
();
});
mViewBinding
.
setOnClickListener
(
view
->
{
switch
(
view
.
getId
())
{
case
R
.
id
.
addVip
:
toStartVipInfo
(
null
);
break
;
}
});
mPresenter
.
getVipLevel
(
0
,
200
);
}
/**
* 设置按钮选中
*
* @param buttonID
*/
private
void
setRadioButtonChecked
(
int
buttonID
)
{
RadioButton
radioButton
=
((
RadioButton
)
mViewBinding
.
vipLevelRadioGroup
.
findViewById
(
buttonID
));
if
(
radioButton
.
isChecked
()){
RadioButton
radioButton
=
((
RadioButton
)
mViewBinding
.
vipLevelR
.
findViewById
(
buttonID
));
if
(
radioButton
.
isChecked
())
{
strVipLevle
=
radioButton
.
getTag
().
toString
();
radioButton
.
getPaint
().
setFakeBoldText
(
true
);
radioButton
.
setTextSize
(
17
);
mPresenter
.
vipListFragment
.
setEnableLoadMore
(
);
mPresenter
.
getVipList
(
0
,
radioButton
.
getTag
().
toString
()
);
vipListAdapter
.
setEnableLoadMore
(
true
);
mPresenter
.
getVipList
(
0
,
strVipLevle
);
}
else
{
}
else
{
radioButton
.
setTextSize
(
15
);
}
}
...
...
@@ -73,31 +105,66 @@ public class VipLevleFragment extends BaseFragment<VipPresenter, FragmentVipleve
}
public
void
getVipLevelSus
(
Pager
<
Level
>
levelPager
)
{
LinearLayout
.
LayoutParams
layoutParams
=
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
);
layoutParams
.
height
=
120
;
layoutParams
.
width
=
LinearLayout
.
LayoutParams
.
MATCH_PARENT
;
for
(
int
i
=
0
;
i
<
levelPager
.
getPageSize
();
i
++)
{
mViewBinding
.
vipLevelR
adioGroup
.
addView
(
addRadioButton
(
layoutParams
,
levelPager
.
getList
().
get
(
i
)));
mViewBinding
.
vipLevelR
.
addView
(
addRadioButton
(
layoutParams
,
levelPager
.
getList
().
get
(
i
)));
}
mViewBinding
.
vipLevelR
adioGroup
.
setOnCheckedChangeListener
((
radioGroup
,
id
)
->
{
mPresenter
.
vipListFragment
.
setVipLevel
(
mViewBinding
.
vipLevelRadioGroup
.
findViewById
(
id
).
getTag
().
toString
());
for
(
int
i
=
0
;
i
<
mViewBinding
.
vipLevelR
adioGroup
.
getChildCount
();
i
++)
{
mViewBinding
.
vipLevelR
.
setOnCheckedChangeListener
((
radioGroup
,
id
)
->
{
// setVipLevel(levelPager.getList(),
mViewBinding.vipLevelRadioGroup.findViewById(id).getTag().toString());
for
(
int
i
=
0
;
i
<
mViewBinding
.
vipLevelR
.
getChildCount
();
i
++)
{
//动态设置按钮颜色
setRadioButtonChecked
(
id
);
}
});
if
(
levelPager
.
getList
().
size
()
!=
0
)
{
((
RadioButton
)
mViewBinding
.
vipLevelR
adioGroup
.
getChildAt
(
0
)).
setChecked
(
true
);
mPresenter
.
getVipList
(
0
,
mViewBinding
.
vipLevelRadioGroup
.
getChildAt
(
0
).
getTag
().
toString
());
if
(
levelPager
.
getList
().
size
()
!=
0
)
{
((
RadioButton
)
mViewBinding
.
vipLevelR
.
getChildAt
(
0
)).
setChecked
(
true
);
mPresenter
.
getVipList
(
0
,
mViewBinding
.
vipLevelR
.
getChildAt
(
0
).
getTag
().
toString
());
}
levels
=
levelPager
.
getList
();
}
private
void
onLoadMore
()
{
mPresenter
.
getVipList
(
pageNumber
,
strVipLevle
);
}
private
void
onRefresh
()
{
pageNumber
=
0
;
mPresenter
.
getVipList
(
pageNumber
,
strVipLevle
);
}
public
void
getVipListSus
(
Pager
<
Vip
>
vipPager
,
int
mPageNumber
)
{
vipListAdapter
.
loadMoreComplete
();
mViewBinding
.
vipRefresh
.
setRefreshing
(
false
);
if
(
mPageNumber
==
0
)
{
vipListAdapter
.
getData
().
clear
();
}
if
(
vipPager
.
isLastPage
())
{
vipListAdapter
.
setEnableLoadMore
(
false
);
vipListAdapter
.
notifyDataSetChanged
();
pageNumber
=
0
;
ToastUtils
.
showShort
(
"没有更多数据"
);
return
;
}
vipListAdapter
.
addData
(
vipPager
.
getList
());
pageNumber
=
vipPager
.
getPageNumber
()
+
1
;
}
public
void
toStartVipInfo
(
Vip
vip
)
{
mPresenter
.
vipInfoFragment
.
setVip
(
vip
);
mPresenter
.
vipInfoFragment
.
setVipLevel
(
levels
);
((
BaseActivity
)
getActivity
()).
start
(
mPresenter
.
vipInfoFragment
);
}
// @Override
// public boolean onBackPressedSupport() {
// return false;
// }
}
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipInfoFragment.java
View file @
42f41ee5
...
...
@@ -4,37 +4,85 @@ package com.xingdata.zzdpos.ui.vip.fragment;
* Created by JM_DEV on 2017/12/21.
*/
import
android.app.DatePickerDialog
;
import
android.graphics.Color
;
import
android.view.View
;
import
android.widget.CheckBox
;
import
android.widget.DatePicker
;
import
android.widget.RadioButton
;
import
android.widget.RadioGroup
;
import
android.widget.TextView
;
import
com.bigkoo.pickerview.OptionsPickerView
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentVip
levelTitle
Binding
;
import
com.xingdata.zzdpos.databinding.FragmentVip
Info
Binding
;
import
com.xingdata.zzdpos.model.Level
;
import
com.xingdata.zzdpos.model.Vip
RechargeOrder
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.vip.VipPresenter
;
import
com.xingdata.zzdpos.ui.vip.adapter.VipRechargeAdapter
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
/**
* 会员信息界面
*/
public
class
VipInfoFragment
extends
BaseFragment
<
VipPresenter
,
FragmentVip
levelTitle
Binding
>
{
private
VipRechargeAdapter
vipRechargeAdapter
;
private
List
<
VipRechargeOrder
>
orders
=
new
ArrayList
<>()
;
public
class
VipInfoFragment
extends
BaseFragment
<
VipPresenter
,
FragmentVip
Info
Binding
>
{
private
List
<
Level
>
levels
;
private
Vip
mVip
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_vip
level_title
;
return
R
.
layout
.
fragment_vip
_info
;
}
@Override
public
void
initView
()
{
if
(
mVip
!=
null
)
{
mViewBinding
.
infoTitle
.
tvTitle
.
setText
(
"修改会员"
);
mViewBinding
.
vipDiscounts
.
setText
(
mVip
.
getVipLevelName
()
+
mVip
.
getVipDefDiscount
()
+
"折"
);
mViewBinding
.
vipBirthday
.
setText
(
StringUtil
.
format
(
new
Date
(
mVip
.
getVipBirthday
())));
mViewBinding
.
vipName
.
setText
(
mVip
.
getVipName
());
mViewBinding
.
vipPhone
.
setText
(
mVip
.
getVipMobile
()
+
""
);
((
CheckBox
)
mViewBinding
.
vipSuper
).
setChecked
(
mVip
.
getVipTag
()
==
1
);
RadioButton
radioButton
=
mViewBinding
.
vipSex
.
findViewWithTag
(
mVip
.
getVipSex
().
toString
());
if
(
radioButton
!=
null
)
{
radioButton
.
setChecked
(
true
);
}
}
else
{
mViewBinding
.
infoTitle
.
tvTitle
.
setText
(
"添加会员"
);
}
if
(
levels
.
size
()
!=
0
)
{
mViewBinding
.
vipDiscounts
.
setText
(
levels
.
get
(
0
).
getVipLevelName
()
+
" "
+
ConvertUtil
.
discount
(
levels
.
get
(
0
).
getVipDefDiscount
())
+
"折"
);
}
mViewBinding
.
setOnClickListener
(
view
->
{
switch
(
view
.
getId
())
{
case
R
.
id
.
vip_discounts
:
ShowPickerViewStoreAddress
();
break
;
case
R
.
id
.
vip_birthday
:
showDialogPick
(
mViewBinding
.
vipBirthday
);
break
;
case
R
.
id
.
onSure
:
mVip
.
setVipName
(
mViewBinding
.
vipName
.
getText
().
toString
().
trim
());
mVip
.
setVipMobile
(
Long
.
parseLong
(
mViewBinding
.
vipPhone
.
getText
().
toString
().
trim
()));
int
sexId
=
mViewBinding
.
vipSex
.
getCheckedRadioButtonId
();
if
(
sexId
!=
-
1
)
{
mVip
.
setVipSex
(
Byte
.
parseByte
(
mViewBinding
.
vipSex
.
findViewById
(
sexId
).
getTag
().
toString
()));
}
mPresenter
.
addVip
(
mVip
);
break
;
}
});
mViewBinding
.
infoTitle
.
ivBack
.
setOnClickListener
(
view
->
{
pop
();
});
}
...
...
@@ -43,13 +91,12 @@ public class VipInfoFragment extends BaseFragment<VipPresenter, FragmentViplevel
* 弹出选择会员P
*/
private
void
ShowPickerViewStoreAddress
()
{
// 弹出选择器
ArrayList
<
Level
>
list
=
new
ArrayList
<>();
OptionsPickerView
pvOptions
=
new
OptionsPickerView
.
Builder
(
getActivity
(),
new
OptionsPickerView
.
OnOptionsSelectListener
()
{
@Override
public
void
onOptionsSelect
(
int
options1
,
int
options2
,
int
options3
,
View
v
)
{
String
tx
=
l
ist
.
get
(
options1
).
getPickerViewText
();
ToastUtils
.
showShort
(
tx
);
String
tx
=
l
evels
.
get
(
options1
).
getPickerViewText
();
mViewBinding
.
vipDiscounts
.
setText
(
tx
+
" "
+
ConvertUtil
.
discount
(
levels
.
get
(
options1
).
getVipDefDiscount
())
+
"折"
);
// mViewBinding.tvSelectStore.setText(tx);
// shops = list.get(options1);
}
...
...
@@ -59,7 +106,42 @@ public class VipInfoFragment extends BaseFragment<VipPresenter, FragmentViplevel
.
setContentTextSize
(
20
)
.
build
();
pvOptions
.
setPicker
(
l
ist
);
pvOptions
.
setPicker
(
l
evels
);
pvOptions
.
show
();
}
public
void
setVipLevel
(
List
<
Level
>
levels
)
{
this
.
levels
=
levels
;
}
public
void
setVip
(
Vip
mVip
)
{
this
.
mVip
=
mVip
;
}
//将两个选择时间的dialog放在该函数中
private
void
showDialogPick
(
final
View
btn
)
{
//获取Calendar对象,用于获取当前时间
final
Calendar
calendar
=
Calendar
.
getInstance
();
int
year
=
calendar
.
get
(
Calendar
.
YEAR
);
int
month
=
calendar
.
get
(
Calendar
.
MONTH
);
int
day
=
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
);
//实例化DatePickerDialog对象
DatePickerDialog
datePickerDialog
=
new
DatePickerDialog
(
mContext
,
new
DatePickerDialog
.
OnDateSetListener
()
{
//选择完日期后会调用该回调函数
@Override
public
void
onDateSet
(
DatePicker
view
,
int
year
,
int
monthOfYear
,
int
dayOfMonth
)
{
//因为monthOfYear会比实际月份少一月所以这边要加1
((
TextView
)
btn
).
setText
(
year
+
"-"
+
(
monthOfYear
+
1
)
+
"-"
+
dayOfMonth
);
}
},
year
,
month
,
day
);
//弹出选择日期对话框
datePickerDialog
.
show
();
}
@Override
public
boolean
onBackPressedSupport
()
{
return
false
;
}
}
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipListFragment.java
deleted
100644 → 0
View file @
aca816ff
package
com
.
xingdata
.
zzdpos
.
ui
.
vip
.
fragment
;
/**
* Created by JM_DEV on 2017/12/21.
*/
import
android.support.v7.widget.LinearLayoutManager
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentVipListBinding
;
import
com.xingdata.zzdpos.model.Level
;
import
com.xingdata.zzdpos.model.Pager
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.vip.VipContract
;
import
com.xingdata.zzdpos.ui.vip.VipPresenter
;
import
com.xingdata.zzdpos.ui.vip.adapter.VipListAdapter
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 会员列表
*/
public
class
VipListFragment
extends
BaseFragment
<
VipPresenter
,
FragmentVipListBinding
>
{
private
VipListAdapter
vipListAdapter
;
private
List
<
Vip
>
vips
=
new
ArrayList
<>();
private
String
vipLevel
;
private
int
pageNumber
=
0
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_vip_list
;
}
@Override
public
void
initView
()
{
vipListAdapter
=
new
VipListAdapter
(
getActivity
(),
vips
);
mViewBinding
.
vipRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
vipRecyclerView
.
setAdapter
(
vipListAdapter
);
mViewBinding
.
vipRefresh
.
setOnRefreshListener
(
this
::
onRefresh
);
vipListAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
((
BaseActivity
)
getActivity
()).
start
(
new
VipExpenseListFragment
());
});
vipListAdapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
vipRecyclerView
);
vipListAdapter
.
setEnableLoadMore
(
true
);
}
//
// public void getVipList(String strViplevel){
// mPresenter.getVipList(0, strViplevel);
// }
private
void
onLoadMore
()
{
mPresenter
.
getVipList
(
pageNumber
,
this
.
vipLevel
);
}
private
void
onRefresh
()
{
pageNumber
=
0
;
mPresenter
.
getVipList
(
pageNumber
,
vipLevel
);
}
public
void
getVipListSus
(
Pager
<
Vip
>
vipPager
,
int
mPageNumber
)
{
vipListAdapter
.
loadMoreComplete
();
mViewBinding
.
vipRefresh
.
setRefreshing
(
false
);
if
(
mPageNumber
==
0
)
{
vipListAdapter
.
getData
().
clear
();
}
if
(
vipPager
.
isLastPage
())
{
vipListAdapter
.
setEnableLoadMore
(
false
);
vipListAdapter
.
notifyDataSetChanged
();
pageNumber
=
0
;
ToastUtils
.
showShort
(
"没有更多数据"
);
return
;
}
vipListAdapter
.
addData
(
vipPager
.
getList
());
pageNumber
=
vipPager
.
getPageNumber
()+
1
;
}
public
void
setVipLevel
(
String
vipLevel
)
{
this
.
vipLevel
=
vipLevel
;
}
public
void
setEnableLoadMore
(){
vipListAdapter
.
setEnableLoadMore
(
true
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipTitleFragment.java
deleted
100644 → 0
View file @
aca816ff
package
com
.
xingdata
.
zzdpos
.
ui
.
vip
.
fragment
;
/**
* Created by JM_DEV on 2017/12/21.
*/
import
android.annotation.SuppressLint
;
import
android.view.Gravity
;
import
android.widget.LinearLayout
;
import
android.widget.RadioButton
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentViplevelTitleBinding
;
import
com.xingdata.zzdpos.databinding.FragmentViptitleBinding
;
import
com.xingdata.zzdpos.ui.vip.VipPresenter
;
public
class
VipTitleFragment
extends
BaseFragment
<
VipPresenter
,
FragmentViptitleBinding
>
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_viptitle
;
}
@Override
public
void
initView
()
{
mViewBinding
.
setOnClickListener
(
view
->
{
switch
(
view
.
getId
()){
case
R
.
id
.
addVip
:
((
BaseActivity
)
getActivity
()).
start
(
mPresenter
.
vipInfoFragment
);
break
;
}
});
mViewBinding
.
titleSearch
.
onBack
.
setOnClickListener
(
view
->
{
getActivity
().
finish
();
});
}
}
app/src/main/res/layout/activity_vip.xml
View file @
42f41ee5
...
...
@@ -5,28 +5,9 @@
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<FrameLayout
android:id=
"@+id/vip_
title_
frame"
android:id=
"@+id/vip_frame"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<LinearLayout
android:layout_weight=
"1"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/all_margin_left"
android:orientation=
"horizontal"
>
<FrameLayout
android:id=
"@+id/vip_level_frame"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"3"
></FrameLayout>
<FrameLayout
android:id=
"@+id/vip_list_frame"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
></FrameLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_vip.xml
0 → 100644
View file @
42f41ee5
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name=
"onClickListener"
type=
"android.view.View.OnClickListener"
/>
<variable
name=
"onCheckedChangeListener"
type=
"android.widget.RadioGroup.OnCheckedChangeListener"
/>
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<include
android:id=
"@+id/title_search"
layout=
"@layout/title_search"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
/>
<ImageView
android:layout_width=
"50dp"
android:layout_height=
"match_parent"
android:background=
"@mipmap/swipe_card_bg"
/>
<ImageView
android:id=
"@+id/onScan"
android:layout_width=
"50dp"
android:layout_height=
"match_parent"
android:background=
"@mipmap/scan_bg"
android:onClick=
"@{onClickListener}"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_margin=
"@dimen/view_line_L5"
android:background=
"@color/line1"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"本店会员"
/>
<TextView
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"今日新增"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"150"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
<TextView
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"10"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/addVip"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:onClick=
"@{onClickListener}"
android:orientation=
"horizontal"
>
<ImageButton
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_margin=
"5dp"
android:background=
"@mipmap/add_bg"
/>
<TextView
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"添加会员"
android:textColor=
"@color/deep_red"
android:textSize=
"22sp"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_margin=
"@dimen/view_line_L5"
android:background=
"@color/line1"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/all_margin_left"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"3"
>
<RadioGroup
android:id=
"@+id/vip_level_R"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"vertical"
></RadioGroup>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
>
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/vip_refresh"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/vipRecyclerView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_vip_info.xml
View file @
42f41ee5
...
...
@@ -5,7 +5,7 @@
<variable
name=
"onClickListener"
type=
"
com.xingdata.zzdpos.util
.OnClickListener"
/>
type=
"
android.view.View
.OnClickListener"
/>
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
...
...
@@ -32,26 +32,26 @@
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:
layout_marginLeft=
"@dimen/all_margin_left
"
android:
background=
"@color/white
"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/default_blacktext_smallstyle"
style=
"@style/default_blacktext_
margin_
smallstyle"
android:layout_width=
"70dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin_left"
android:text=
"姓名"
/>
<EditText
android:id=
"@+id/vip_name"
style=
"@style/dialog_edit"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:background=
"@null"
android:hint=
"请输入
手机号
"
/>
android:hint=
"请输入
姓名
"
/>
</LinearLayout>
<View
...
...
@@ -63,21 +63,26 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:
layout_marginLeft=
"@dimen/all_margin_left
"
android:
background=
"@color/white
"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/default_blacktext_smallstyle"
style=
"@style/default_blacktext_
margin_
smallstyle"
android:layout_width=
"70dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin_left"
android:digits=
"0123456789"
android:inputType=
"phone"
android:maxLines=
"11"
android:text=
"手机号"
/>
<EditText
android:id=
"@+id/vip_phone"
style=
"@style/dialog_edit"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@null"
android:hint=
"请输入
姓名
"
/>
android:hint=
"请输入
手机号
"
/>
</LinearLayout>
</LinearLayout>
...
...
@@ -98,16 +103,18 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin_left"
android:background=
"@color/white"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/default_blacktext_smallstyle"
style=
"@style/default_blacktext_
margin_
smallstyle"
android:layout_width=
"70dp"
android:layout_height=
"wrap_content"
android:text=
"
手机号号
"
/>
android:text=
"
性别
"
/>
<RadioGroup
android:id=
"@+id/vip_sex"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"12sp"
...
...
@@ -116,15 +123,21 @@
<RadioButton
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"50dp"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:
background=
"@drawable/radio_select
"
android:
tag=
"1
"
android:text=
"男"
/>
<RadioButton
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"50dp"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:tag=
"0"
android:text=
"女"
/>
</RadioGroup>
...
...
@@ -134,6 +147,85 @@
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/line_bg"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/default_blacktext_margin_smallstyle"
android:layout_width=
"70dp"
android:layout_height=
"wrap_content"
android:text=
"级别"
/>
<TextView
android:id=
"@+id/vip_discounts"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/sp_12"
android:drawableRight=
"@mipmap/ic_expand"
android:onClick=
"@{onClickListener}"
/>
<CheckBox
android:id=
"@+id/vip_super"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"50dp"
android:layout_marginRight=
"50dp"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:text=
"超级VIP"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/line_bg"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/default_blacktext_margin_smallstyle"
android:layout_width=
"70dp"
android:layout_height=
"wrap_content"
android:text=
"生日"
/>
<TextView
android:id=
"@+id/vip_birthday"
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"请选择"
android:onClick=
"@{onClickListener}"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"bottom"
android:orientation=
"horizontal"
>
<Button
android:id=
"@+id/onSure"
style=
"@style/button_positive_noradius"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"15dp"
android:onClick=
"@{onClickListener}"
android:text=
"确认"
/>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_vip_list.xml
View file @
42f41ee5
...
...
@@ -5,15 +5,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/vip_refresh"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/vipRecyclerView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_viplevel_title.xml
View file @
42f41ee5
...
...
@@ -6,12 +6,7 @@
android:background=
"@color/white"
android:orientation=
"vertical"
>
<RadioGroup
android:id=
"@+id/vip_level_RadioGroup"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"vertical"
></RadioGroup>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_viptitle.xml
View file @
42f41ee5
...
...
@@ -20,126 +20,7 @@
android:background=
"@color/white"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<include
android:id=
"@+id/title_search"
layout=
"@layout/title_search"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
/>
<ImageView
android:layout_width=
"50dp"
android:layout_height=
"match_parent"
android:background=
"@mipmap/swipe_card_bg"
/>
<ImageView
android:id=
"@+id/onScan"
android:layout_width=
"50dp"
android:layout_height=
"match_parent"
android:background=
"@mipmap/scan_bg"
android:onClick=
"@{onClickListener}"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_margin=
"@dimen/view_line_L5"
android:background=
"@color/line1"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"本店会员"
/>
<TextView
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"今日新增"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"150"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
<TextView
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"10"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/addVip"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:onClick=
"@{onClickListener}"
android:orientation=
"horizontal"
>
<ImageButton
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_margin=
"5dp"
android:background=
"@mipmap/add_bg"
/>
<TextView
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"添加会员"
android:textColor=
"@color/deep_red"
android:textSize=
"22sp"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_margin=
"@dimen/view_line_L5"
android:background=
"@color/line1"
/>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/ic_expand.9.png
0 → 100644
View file @
42f41ee5
268 Bytes
app/src/main/res/mipmap-xhdpi/radiobutton_checked.9.png
0 → 100644
View file @
42f41ee5
645 Bytes
app/src/main/res/mipmap-xhdpi/radiobutton_normal.9.png
0 → 100644
View file @
42f41ee5
641 Bytes
app/src/main/res/values/styles.xml
View file @
42f41ee5
...
...
@@ -39,7 +39,19 @@
<item
name=
"android:layout_height"
>
match_parent
</item>
<item
name=
"android:gravity"
>
center_vertical
</item>
<item
name=
"android:singleLine"
>
true
</item>
<item
name=
"android:padding"
>
@dimen/dp_4
</item>
<item
name=
"android:padding"
>
@dimen/sp_12
</item>
<item
name=
"android:textColor"
>
@color/black
</item>
<item
name=
"android:textSize"
>
@dimen/detail_textview_size
</item>
</style>
<style
name=
"default_blacktext_margin_smallstyle"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
match_parent
</item>
<item
name=
"android:gravity"
>
center_vertical
</item>
<item
name=
"android:singleLine"
>
true
</item>
<item
name=
"android:layout_marginLeft"
>
17dp
</item>
<item
name=
"android:padding"
>
@dimen/sp_12
</item>
<item
name=
"android:paddingBottom"
>
@dimen/sp_12
</item>
<item
name=
"android:paddingTop"
>
@dimen/sp_12
</item>
<item
name=
"android:textColor"
>
@color/black
</item>
<item
name=
"android:textSize"
>
@dimen/detail_textview_size
</item>
</style>
...
...
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