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
6f502ee4
Commit
6f502ee4
authored
Dec 22, 2017
by
王海
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
f0f0142e
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1143 additions
and
533 deletions
+1143
-533
app/src/main/java/com/xingdata/zzdpos/ui/login/LoginActivity.java
...main/java/com/xingdata/zzdpos/ui/login/LoginActivity.java
+2
-1
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/IntegralActivity.java
...ngdata/zzdpos/ui/marketing/integral/IntegralActivity.java
+7
-201
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/IntegralPresenter.java
...gdata/zzdpos/ui/marketing/integral/IntegralPresenter.java
+4
-1
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/adapter/IntegralAdapter.java
...zzdpos/ui/marketing/integral/adapter/IntegralAdapter.java
+2
-2
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/adapter/IntegralExchangeAdapter.java
...i/marketing/integral/adapter/IntegralExchangeAdapter.java
+7
-4
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/dialog/IntegralGetDialog.java
...zdpos/ui/marketing/integral/dialog/IntegralGetDialog.java
+1
-88
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralGetFragment.java
...s/ui/marketing/integral/fragment/IntegralGetFragment.java
+539
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralIndexFragment.java
...ui/marketing/integral/fragment/IntegralIndexFragment.java
+246
-0
app/src/main/res/layout/activity_integral.xml
app/src/main/res/layout/activity_integral.xml
+4
-183
app/src/main/res/layout/dialog_integral_get_setting.xml
app/src/main/res/layout/dialog_integral_get_setting.xml
+10
-0
app/src/main/res/layout/fragment_casher.xml
app/src/main/res/layout/fragment_casher.xml
+1
-1
app/src/main/res/layout/fragment_integral_main.xml
app/src/main/res/layout/fragment_integral_main.xml
+161
-0
app/src/main/res/layout/fragment_myself.xml
app/src/main/res/layout/fragment_myself.xml
+1
-1
app/src/main/res/layout/fragment_service.xml
app/src/main/res/layout/fragment_service.xml
+1
-1
app/src/main/res/layout/item_integral.xml
app/src/main/res/layout/item_integral.xml
+143
-37
app/src/main/res/layout/title.xml
app/src/main/res/layout/title.xml
+9
-9
app/src/main/res/layout/title_appback.xml
app/src/main/res/layout/title_appback.xml
+5
-4
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/login/LoginActivity.java
View file @
6f502ee4
...
@@ -23,6 +23,7 @@ import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean;
...
@@ -23,6 +23,7 @@ import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean
;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean
;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean
;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity
;
import
com.xingdata.zzdpos.ui.payment.PaymentActivity
;
import
com.xingdata.zzdpos.ui.splash.SplashActivity
;
import
com.xingdata.zzdpos.ui.splash.SplashActivity
;
import
com.xingdata.zzdpos.view.PopupWindowDownList
;
import
com.xingdata.zzdpos.view.PopupWindowDownList
;
...
@@ -137,7 +138,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
...
@@ -137,7 +138,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
promptDialog
.
dismiss
();
promptDialog
.
dismiss
();
//如果sn已经绑定款台,则直接跳转主页
//如果sn已经绑定款台,则直接跳转主页
if
(
loginReturnBean
.
getBindSN
())
{
if
(
loginReturnBean
.
getBindSN
())
{
startActivity
(
new
Intent
(
LoginActivity
.
this
,
Main
Activity
.
class
));
startActivity
(
new
Intent
(
LoginActivity
.
this
,
Integral
Activity
.
class
));
LoginActivity
.
this
.
finish
();
LoginActivity
.
this
.
finish
();
return
;
return
;
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/IntegralActivity.java
View file @
6f502ee4
This diff is collapsed.
Click to expand it.
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/IntegralPresenter.java
View file @
6f502ee4
...
@@ -8,6 +8,8 @@ import com.xingdata.zzdpos.model.Category;
...
@@ -8,6 +8,8 @@ import com.xingdata.zzdpos.model.Category;
import
com.xingdata.zzdpos.model.Gbound
;
import
com.xingdata.zzdpos.model.Gbound
;
import
com.xingdata.zzdpos.model.Ubound
;
import
com.xingdata.zzdpos.model.Ubound
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment
;
import
com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralIndexFragment
;
import
java.util.List
;
import
java.util.List
;
...
@@ -19,7 +21,8 @@ import io.reactivex.functions.Function;
...
@@ -19,7 +21,8 @@ import io.reactivex.functions.Function;
public
class
IntegralPresenter
extends
IntegralContract
.
Presenter
{
public
class
IntegralPresenter
extends
IntegralContract
.
Presenter
{
private
int
number
=
1
;
private
int
number
=
1
;
public
IntegralIndexFragment
integralIndexFragment
=
new
IntegralIndexFragment
();
public
IntegralGetFragment
integralGetFragment
=
new
IntegralGetFragment
();
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/adapter/IntegralAdapter.java
View file @
6f502ee4
...
@@ -35,9 +35,9 @@ public class IntegralAdapter extends BaseAdapter<Gbound, ItemIntegralBinding> {
...
@@ -35,9 +35,9 @@ public class IntegralAdapter extends BaseAdapter<Gbound, ItemIntegralBinding> {
mViewBinding
.
tvGet
.
setText
(
item
.
getTruleName
());
mViewBinding
.
tvGet
.
setText
(
item
.
getTruleName
());
//开通启用状态 0:正常 1 暂停 默认 0
//开通启用状态 0:正常 1 暂停 默认 0
if
(
item
.
getBoundGetStatus
()
==
0
)
{
if
(
item
.
getBoundGetStatus
()
==
0
)
{
mViewBinding
.
tvStatus
.
set
ImageResource
(
R
.
mipmap
.
integral_open
);
mViewBinding
.
tvStatus
.
set
Text
(
"启用"
);
}
else
{
}
else
{
mViewBinding
.
tvStatus
.
set
ImageResource
(
R
.
mipmap
.
integral_close
);
mViewBinding
.
tvStatus
.
set
Text
(
"未启用"
);
}
}
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/adapter/IntegralExchangeAdapter.java
View file @
6f502ee4
...
@@ -2,8 +2,6 @@ package com.xingdata.zzdpos.ui.marketing.integral.adapter;
...
@@ -2,8 +2,6 @@ package com.xingdata.zzdpos.ui.marketing.integral.adapter;
import
android.support.annotation.Nullable
;
import
android.support.annotation.Nullable
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.databinding.ItemIntegralBinding
;
import
com.xingdata.zzdpos.databinding.ItemIntegralBinding
;
import
com.xingdata.zzdpos.model.Ubound
;
import
com.xingdata.zzdpos.model.Ubound
;
...
@@ -22,6 +20,11 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin
...
@@ -22,6 +20,11 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin
@Override
@Override
protected
void
convert
(
ItemIntegralBinding
mViewBinding
,
Ubound
item
)
{
protected
void
convert
(
ItemIntegralBinding
mViewBinding
,
Ubound
item
)
{
mViewBinding
.
tvVipTitle
.
setText
(
"积分面值"
);
mViewBinding
.
tvSourceTitle
.
setText
(
"兑换规则"
);
mViewBinding
.
tvVip
.
setText
(
item
.
getBoundValAmt
()
+
"个积分=1元"
);
mViewBinding
.
tvVip
.
setText
(
item
.
getBoundValAmt
()
+
"个积分=1元"
);
//兑换规则
//兑换规则
if
(
item
.
getBoundOrderAmt
()
!=
null
&&
item
.
getBoundUseNum
()
!=
null
)
{
if
(
item
.
getBoundOrderAmt
()
!=
null
&&
item
.
getBoundUseNum
()
!=
null
)
{
...
@@ -33,9 +36,9 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin
...
@@ -33,9 +36,9 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin
if
(
item
.
getBoundUseStatus
()
!=
null
)
{
if
(
item
.
getBoundUseStatus
()
!=
null
)
{
//开通启用状态 0:正常 1 暂停 默认 0
//开通启用状态 0:正常 1 暂停 默认 0
if
(
item
.
getBoundUseStatus
()
==
0
)
{
if
(
item
.
getBoundUseStatus
()
==
0
)
{
mViewBinding
.
tvStatus
.
set
ImageResource
(
R
.
mipmap
.
integral_open
);
mViewBinding
.
tvStatus
.
set
Text
(
"启用"
);
}
else
{
}
else
{
mViewBinding
.
tvStatus
.
set
ImageResource
(
R
.
mipmap
.
integral_close
);
mViewBinding
.
tvStatus
.
set
Text
(
"未启用"
);
}
}
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/dialog/IntegralGetDialog.java
View file @
6f502ee4
...
@@ -79,94 +79,7 @@ public class IntegralGetDialog extends BaseDialog<IntegralPresenter,
...
@@ -79,94 +79,7 @@ public class IntegralGetDialog extends BaseDialog<IntegralPresenter,
setCancelable
(
false
);
setCancelable
(
false
);
mViewBinding
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
hintKbTwo
();
switch
(
v
.
getId
())
{
case
R
.
id
.
rd_suspendeds
:
{
//暂停
gbound
.
setBoundGetStatus
(
1
);
}
break
;
case
R
.
id
.
rd_starts
:
{
//启用
gbound
.
setBoundGetStatus
(
0
);
}
break
;
case
R
.
id
.
rd_gettype_all
:
{
//通用
showView
(
v
.
getId
());
gbound
.
setVipGboundType
((
byte
)
0
);
}
break
;
case
R
.
id
.
rd_gettype_category
:
{
//品类定义
showView
(
v
.
getId
());
gbound
.
setVipGboundType
((
byte
)
1
);
}
break
;
case
R
.
id
.
rd_gettype_shop
:
{
//商品定义
showView
(
v
.
getId
());
gbound
.
setVipGboundType
((
byte
)
2
);
}
break
;
case
R
.
id
.
tv_vip_level_select
:
{
Realm
realm
=
Realm
.
getInstance
(
App
.
instance
.
mRealmConfig
);
RealmResults
<
Level
>
realmResult
=
realm
.
where
(
Level
.
class
)
.
findAll
();
if
(
realmResult
!=
null
&&
realmResult
.
size
()
>
0
)
{
initVipLevelOptionPicker
(
realmResult
);
}
}
break
;
case
R
.
id
.
tv_category_select_one
:
{
mPresenter
.
initData
(
getCategory
(
v
.
getId
()),
ONE_CATEGORY
);
mViewBinding
.
tvCategorySelectTwo
.
setText
(
""
);
mViewBinding
.
tvCategorySelectThree
.
setText
(
""
);
}
break
;
case
R
.
id
.
tv_category_select_two
:
{
if
(
nowShopTypeId
>=
1
)
{
mPresenter
.
initData
(
getCategory
(
v
.
getId
()),
TWO_CATEGORY
);
mViewBinding
.
tvCategorySelectThree
.
setText
(
""
);
nowShopTypeId
=
2
;
}
else
{
ToastUtils
.
showLong
(
"请先选择第一类品类"
);
}
}
break
;
case
R
.
id
.
tv_category_select_three
:
{
if
(
nowShopTypeId
>=
2
)
{
mPresenter
.
initData
(
getCategory
(
v
.
getId
()),
THREE_CATEGORY
);
nowShopTypeId
=
3
;
}
else
{
ToastUtils
.
showLong
(
"请先选择第一二类品类"
);
}
}
break
;
default
:
{
}
break
;
}
}
});
if
(
nowType
==
0
)
{
setShopTypeClick
(
false
);
updateUi
();
}
else
if
(
nowType
==
1
)
{
setShopTypeClick
(
true
);
mViewBinding
.
rdSuspendeds
.
setChecked
(
true
);
gbound
.
setBoundGetStatus
(
1
);
gbound
.
setVipGboundType
((
byte
)
0
);
}
if
(
loadingDialog
!=
null
)
{
loadingDialog
.
dismiss
();
}
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralGetFragment.java
0 → 100644
View file @
6f502ee4
This diff is collapsed.
Click to expand it.
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralIndexFragment.java
0 → 100644
View file @
6f502ee4
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
integral
.
fragment
;
import
android.support.annotation.Nullable
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.blankj.utilcode.util.ActivityUtils
;
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.FragmentIntegralMainBinding
;
import
com.xingdata.zzdpos.model.Category
;
import
com.xingdata.zzdpos.model.Gbound
;
import
com.xingdata.zzdpos.model.Pager
;
import
com.xingdata.zzdpos.model.Ubound
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter
;
import
com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralAdapter
;
import
com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralExchangeAdapter
;
import
com.xingdata.zzdpos.ui.marketing.integral.dialog.IntegralExchangeDialog
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 绑定款台界面
* <p>
* 设备没有绑定款台的进行绑定操作
*/
public
class
IntegralIndexFragment
extends
BaseFragment
<
IntegralPresenter
,
FragmentIntegralMainBinding
>
{
// IntegralGetDialog integralGetDialog;
IntegralAdapter
integralAdapter
;
IntegralExchangeAdapter
integralExchangeAdapter
;
private
Boolean
isLoadMore
=
false
;
public
static
final
int
NORMAL_TYPE
=
1
;
public
static
final
int
LOADMORE_TYPE
=
2
;
public
static
final
int
REFRESH_TYPE
=
3
;
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
private
long
mExitTime
;
//控制快速点击
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_integral_main
;
}
@Override
public
void
initView
()
{
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"积分规则"
);
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
ActivityUtils
.
finishActivity
(
IntegralActivity
.
class
);
}
});
integralAdapter
=
new
IntegralAdapter
(
R
.
layout
.
item_integral
,
new
ArrayList
<>());
LinearLayoutManager
linearLayoutManager
=
new
LinearLayoutManager
(
getActivity
());
linearLayoutManager
.
setOrientation
(
LinearLayoutManager
.
VERTICAL
);
mViewBinding
.
rvMessage
.
setLayoutManager
(
linearLayoutManager
);
mViewBinding
.
rvMessage
.
setAdapter
(
integralAdapter
);
List
<
Ubound
>
list
=
new
ArrayList
<>();
Ubound
ubound
=
new
Ubound
();
ubound
.
setBoundValAmt
(
1000
l
);
ubound
.
setBoundUseStatus
((
byte
)
0
);
ubound
.
setBoundOrderAmt
(
10
l
);
ubound
.
setBoundUseNum
(
10000
l
);
list
.
add
(
ubound
);
integralExchangeAdapter
=
new
IntegralExchangeAdapter
(
R
.
layout
.
item_integral
,
list
);
LinearLayoutManager
linearLayoutManager1
=
new
LinearLayoutManager
(
getActivity
());
linearLayoutManager1
.
setOrientation
(
LinearLayoutManager
.
VERTICAL
);
mViewBinding
.
rvExchangeMessage
.
setLayoutManager
(
linearLayoutManager1
);
mViewBinding
.
rvExchangeMessage
.
setAdapter
(
integralExchangeAdapter
);
mViewBinding
.
setOnClickListener
(
v
->
{
switch
(
v
.
getId
())
{
case
R
.
id
.
btn_add
:
{
mPresenter
.
integralGetFragment
.
setNowType
(
1
);
start
(
mPresenter
.
integralGetFragment
);
// integralGetDialog = new IntegralGetDialog();
// integralGetDialog.setNowType(1);
// integralGetDialog.show((BaseActivity) getActivity());
}
break
;
case
R
.
id
.
rb_get
:
{
mViewBinding
.
rbGet
.
getPaint
().
setFakeBoldText
(
true
);
mViewBinding
.
rbExchange
.
getPaint
().
setFakeBoldText
(
false
);
showView
(
v
.
getId
());
mPresenter
.
query
(
1
,
NORMAL_TYPE
,
null
);
}
break
;
case
R
.
id
.
rb_exchange
:
{
mViewBinding
.
rbGet
.
getPaint
().
setFakeBoldText
(
false
);
mViewBinding
.
rbExchange
.
getPaint
().
setFakeBoldText
(
true
);
showView
(
v
.
getId
());
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
mPresenter
.
exchangeQuery
(
loadingDialog
);
}
break
;
default
:
{
}
break
;
}
});
//set Presenter listener
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
refreshProduct
);
integralAdapter
.
setOnLoadMoreListener
(
this
::
loadMoreProduct
,
mViewBinding
.
rvMessage
);
integralAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
clickProduct
(
integralAdapter
.
getData
().
get
(
position
)));
integralExchangeAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
exchangeClickProduct
(
integralExchangeAdapter
.
getData
().
get
(
position
)));
mPresenter
.
query
(
1
,
NORMAL_TYPE
,
null
);
}
public
void
initComplete
(
List
<
Category
>
list
,
int
nowCategory
)
{
if
(
list
.
size
()
<=
0
)
{
return
;
}
mPresenter
.
integralGetFragment
.
setCategoryDate
(
list
,
nowCategory
);
}
public
void
querySucc
(
@Nullable
Pager
<
Gbound
>
pager
,
Boolean
isLoadMore
,
int
queryType
,
LoadingDialog
loadingDialog
)
{
if
(
loadingDialog
!=
null
)
{
loadingDialog
.
dismiss
();
}
this
.
isLoadMore
=
isLoadMore
;
if
(
pager
==
null
||
pager
.
getList
()
==
null
||
pager
.
getList
().
size
()
<=
0
)
{
integralAdapter
.
setEmptyView
(
getEmptyView
(
"没有规则"
));
}
if
(
pager
.
getList
()
!=
null
)
{
switch
(
queryType
)
{
case
NORMAL_TYPE:
{
//正常请求
integralAdapter
.
setNewData
(
pager
.
getList
());
}
break
;
case
LOADMORE_TYPE:
{
//加载更多
integralAdapter
.
addData
(
pager
.
getList
());
}
break
;
case
REFRESH_TYPE:
{
//刷新请求
integralAdapter
.
setNewData
(
pager
.
getList
());
}
break
;
}
}
integralAdapter
.
setEnableLoadMore
(
false
);
mViewBinding
.
srlProduct
.
setRefreshing
(
false
);
}
public
void
exchangeQuerySucc
(
Pager
<
Ubound
>
uboundPager
,
LoadingDialog
loadingDialog
)
{
if
(
loadingDialog
!=
null
)
{
loadingDialog
.
dismiss
();
}
if
(
uboundPager
!=
null
&&
uboundPager
.
getList
()
!=
null
)
{
integralExchangeAdapter
.
setNewData
(
uboundPager
.
getList
());
}
}
/**
* 刷新商品
*/
private
void
refreshProduct
()
{
integralAdapter
.
setEnableLoadMore
(
false
);
mPresenter
.
query
(
1
,
REFRESH_TYPE
,
null
);
}
/**
* 加载更多商品
*/
private
void
loadMoreProduct
()
{
mViewBinding
.
srlProduct
.
setRefreshing
(
false
);
if
(
isLoadMore
)
{
mPresenter
.
query
(-
1
,
LOADMORE_TYPE
,
null
);
}
}
/**
* 积分获取页面点击item
*/
private
void
clickProduct
(
Gbound
gbound
)
{
if
((
System
.
currentTimeMillis
()
-
mExitTime
)
>
1000
)
{
// integralGetDialog = new IntegralGetDialog();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
mPresenter
.
integralGetFragment
.
setData
(
gbound
,
loadingDialog
);
start
(
mPresenter
.
integralGetFragment
);
// integralGetDialog.show((BaseActivity) getActivity());
mExitTime
=
System
.
currentTimeMillis
();
}
else
{
ToastUtils
.
showLong
(
"您操作太快了"
);
}
}
/**
* 积分兑换页面点击item
*/
private
void
exchangeClickProduct
(
Ubound
gbound
)
{
if
((
System
.
currentTimeMillis
()
-
mExitTime
)
>
1000
)
{
IntegralExchangeDialog
integralExchangeDialog
=
new
IntegralExchangeDialog
();
integralExchangeDialog
.
setData
(
gbound
);
integralExchangeDialog
.
show
((
BaseActivity
)
getActivity
());
mExitTime
=
System
.
currentTimeMillis
();
}
else
{
ToastUtils
.
showLong
(
"您操作太快了"
);
}
}
private
View
getEmptyView
(
String
str
)
{
View
view
=
getLayoutInflater
().
inflate
(
R
.
layout
.
view_empty
,
null
);
((
TextView
)
view
.
findViewById
(
R
.
id
.
tv_empty
)).
setText
(
str
);
return
view
;
}
private
void
showView
(
int
id
)
{
switch
(
id
)
{
case
R
.
id
.
rb_get
:
{
mViewBinding
.
llGet
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
llExchange
.
setVisibility
(
View
.
GONE
);
}
break
;
case
R
.
id
.
rb_exchange
:
{
mViewBinding
.
llGet
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
llExchange
.
setVisibility
(
View
.
VISIBLE
);
}
break
;
}
}
}
app/src/main/res/layout/activity_integral.xml
View file @
6f502ee4
...
@@ -10,197 +10,18 @@
...
@@ -10,197 +10,18 @@
<android.support.constraint.ConstraintLayout
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:background=
"@color/white"
>
tools:context=
"com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity"
>
<include
<FrameLayout
android:id=
"@+id/ic_title"
android:id=
"@+id/frg"
layout=
"@layout/title"
/>
<LinearLayout
android:id=
"@+id/btn_add"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:background=
"@drawable/singleline_white_gray"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:orientation=
"horizontal"
app:layout_constraintBottom_toTopOf=
"@id/ll_menu"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ic_title"
app:layout_constraintVertical_weight=
"@integer/all_top_weight"
>
<ImageView
android:id=
"@+id/iv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/but_add"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_padding"
android:text=
"添加获取规则"
android:textColor=
"@color/red_guanyu"
android:textSize=
"@dimen/text_three_title"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_menu"
android:layout_width=
"0dp"
android:layout_height=
"49dp"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"horizontal"
app:layout_constraintBottom_toBottomOf=
"@id/cl_bottom"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/btn_add"
app:layout_constraintVertical_weight=
"2.5"
>
<RadioGroup
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:checkedButton=
"@id/rb_get"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/rb_get"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/radio_select"
android:button=
"@null"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:padding=
"@dimen/all_padding"
android:text=
"获取规则"
android:textColor=
"@drawable/radio_select"
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rb_exchange"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/radio_select"
android:button=
"@null"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:padding=
"@dimen/all_padding"
android:text=
"兑换规则"
android:textColor=
"@drawable/radio_select"
android:textSize=
"@dimen/et_textsize"
/>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id=
"@+id/cl_bottom"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:orientation=
"vertical"
android:padding=
"@dimen/padding_big"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ll_menu"
app:layout_constraintTop_toTopOf=
"parent"
></FrameLayout>
app:layout_constraintVertical_weight=
"22"
>
<LinearLayout
android:id=
"@+id/ll_get"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/srl_product"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_message"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_exchange"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:orientation=
"vertical"
android:padding=
"@dimen/cl_padding"
android:visibility=
"gone"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:text=
"积分面值"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"5"
android:text=
"兑换规则"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:text=
"备注"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"状态 "
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_height"
android:layout_marginTop=
"@dimen/all_margin"
android:background=
"@color/vip_line"
android:paddingBottom=
"@dimen/all_padding"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_exchange_message"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
...
...
app/src/main/res/layout/dialog_integral_get_setting.xml
View file @
6f502ee4
...
@@ -571,5 +571,15 @@
...
@@ -571,5 +571,15 @@
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<Button
android:id=
"@+id/btn_add"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/red_guanyu"
android:text=
"添加"
android:textColor=
"@color/white"
android:onClick=
"@{OnClickListener}"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_casher.xml
View file @
6f502ee4
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
android:background=
"@color/gray_zhouyu"
android:background=
"@color/gray_zhouyu"
tools:context=
"com.example.administrator.tangkupos.CasherFragment"
>
tools:context=
"com.example.administrator.tangkupos.CasherFragment"
>
<!-- TODO: Update blank fragm
ent la
yout -->
<!-- TODO: Update blank fragm
fragment_integral_index
yout -->
<android.support.constraint.Guideline
<android.support.constraint.Guideline
android:id=
"@+id/guideline"
android:id=
"@+id/guideline"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/fragment_integral_main.xml
0 → 100644
View file @
6f502ee4
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name=
"OnClickListener"
type=
"android.view.View.OnClickListener"
></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
>
<include
android:id=
"@+id/ic_title"
layout=
"@layout/title"
/>
<LinearLayout
android:id=
"@+id/btn_add"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@drawable/singleline_white_gray"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:orientation=
"horizontal"
app:layout_constraintBottom_toTopOf=
"@id/ll_menu"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/ic_title"
>
<ImageView
android:id=
"@+id/iv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/but_add"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_padding"
android:text=
"添加获取规则"
android:textColor=
"@color/red_guanyu"
android:textSize=
"@dimen/text_three_title"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_menu"
android:layout_width=
"0dp"
android:layout_height=
"49dp"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"horizontal"
app:layout_constraintBottom_toBottomOf=
"@id/cl_bottom"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/btn_add"
app:layout_constraintVertical_weight=
"2.5"
>
<RadioGroup
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:checkedButton=
"@id/rb_get"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/rb_get"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/radio_select"
android:button=
"@null"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:padding=
"@dimen/all_padding"
android:text=
"获取规则"
android:textColor=
"@drawable/radio_select"
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rb_exchange"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/radio_select"
android:button=
"@null"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:padding=
"@dimen/all_padding"
android:text=
"兑换规则"
android:textColor=
"@drawable/radio_select"
android:textSize=
"@dimen/et_textsize"
/>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id=
"@+id/cl_bottom"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ll_menu"
app:layout_constraintVertical_weight=
"22"
>
<LinearLayout
android:id=
"@+id/ll_get"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
android:padding=
"@dimen/all_padding"
>
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/srl_product"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_message"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_exchange"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
android:padding=
"@dimen/all_padding"
android:visibility=
"gone"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_exchange_message"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_myself.xml
View file @
6f502ee4
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
android:background=
"@color/gray_zhouyu"
android:background=
"@color/gray_zhouyu"
tools:context=
"com.example.administrator.tangkupos.CasherFragment"
>
tools:context=
"com.example.administrator.tangkupos.CasherFragment"
>
<!-- TODO: Update blank fragm
ent la
yout -->
<!-- TODO: Update blank fragm
fragment_integral_index
yout -->
<android.support.constraint.Guideline
<android.support.constraint.Guideline
android:id=
"@+id/guideline"
android:id=
"@+id/guideline"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/fragment_service.xml
View file @
6f502ee4
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
android:background=
"@color/gray_zhouyu"
android:background=
"@color/gray_zhouyu"
tools:context=
"com.example.administrator.tangkupos.CasherFragment"
>
tools:context=
"com.example.administrator.tangkupos.CasherFragment"
>
<!-- TODO: Update blank fragm
ent la
yout -->
<!-- TODO: Update blank fragm
fragment_integral_index
yout -->
<android.support.constraint.Guideline
<android.support.constraint.Guideline
android:id=
"@+id/guideline"
android:id=
"@+id/guideline"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/item_integral.xml
View file @
6f502ee4
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout>
<layout>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/cv_item"
android:id=
"@+id/cv_item"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:layout_marginTop=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
android:background=
"@color/gray_zhouyu"
android:paddingBottom=
"@dimen/all_padding"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_vip"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:text=
"适用会员"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
<RelativeLayout
android:id=
"@+id/tv_source"
android:layout_width=
"match_parent"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:
layout_weight=
"5
"
android:
background=
"@mipmap/integral_bg
"
android:
text=
"来源品类
"
android:
orientation=
"horizontal
"
android:
textSize=
"@dimen/et_textsize"
/
>
android:
padding=
"@dimen/all_padding"
>
<TextView
<TextView
android:id=
"@+id/tv_get"
android:id=
"@+id/tv_get"
android:layout_width=
"0dp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:layout_centerHorizontal=
"true"
android:text=
"获取规则"
android:gravity=
"center"
android:textSize=
"@dimen/et_textsize"
/>
android:text=
"满100送一个积分"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_secondary_title"
/>
<ImageView
</RelativeLayout>
android:id=
"@+id/tv_status"
android:layout_width=
"0dp"
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_marginLeft=
"@dimen/all_padding"
android:src=
"@mipmap/integral_open"
android:layout_marginRight=
"@dimen/all_padding"
android:textSize=
"@dimen/et_textsize"
/>
android:layout_marginTop=
"55dp"
>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_vip"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_margin"
>
<TextView
android:id=
"@+id/tv_vip_title"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"适用会员"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_vip"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:gravity=
"right"
android:text=
"金牌会员"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_source"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/ll_vip"
android:background=
"@color/white"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_margin"
>
<TextView
android:id=
"@+id/tv_source_title"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"来源品类"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_source"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:gravity=
"right"
android:singleLine=
"true"
android:text=
"金牌会员"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_status"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/ll_source"
android:background=
"@color/white"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_margin"
>
<TextView
android:id=
"@+id/tv_status_title"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"启用状态"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_status"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:gravity=
"right"
android:text=
"启用状态"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</RelativeLayout>
<!--<TextView-->
<!--android:id="@+id/tv_source"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="5"-->
<!--android:text="来源品类"-->
<!--android:textSize="@dimen/et_textsize"/>-->
<!--<TextView-->
<!--android:id="@+id/tv_get"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="3"-->
<!--android:text="获取规则"-->
<!--android:textSize="@dimen/et_textsize"/>-->
<!--<ImageView-->
<!--android:id="@+id/tv_status"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="1"-->
<!--android:src="@mipmap/integral_open"-->
<!--android:textSize="@dimen/et_textsize"/>-->
</RelativeLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/title.xml
View file @
6f502ee4
...
@@ -11,17 +11,17 @@
...
@@ -11,17 +11,17 @@
</data>
</data>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@drawable/singleline_white_gray"
android:background=
"@drawable/singleline_white_gray"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<Image
View
<Image
Button
android:id=
"@+id/iv_back"
android:id=
"@+id/iv_back"
android:layout_width=
"
@dimen/title_height
"
android:layout_width=
"
?attr/actionBarSize
"
android:layout_height=
"
wrap_cont
ent"
android:layout_height=
"
match_par
ent"
android:
gravity=
"center
"
android:
background=
"@color/transparent
"
android:onClick=
"@{onClickListener}"
android:onClick=
"@{onClickListener}"
android:padding=
"@dimen/all_margin"
android:padding=
"@dimen/all_margin"
android:src=
"@mipmap/back_black"
/>
android:src=
"@mipmap/back_black"
/>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
android:layout_centerInParent=
"true"
android:layout_centerInParent=
"true"
android:text=
"标题"
android:text=
"标题"
android:textColor=
"@color/black_baozheng"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/text_secondary_title"
/>
android:textSize=
"@dimen/text_secondary_title"
/>
</RelativeLayout>
</RelativeLayout>
...
...
app/src/main/res/layout/title_appback.xml
View file @
6f502ee4
...
@@ -12,18 +12,19 @@
...
@@ -12,18 +12,19 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
@dimen/title_height
"
android:layout_height=
"
?attr/actionBarSize
"
android:background=
"@drawable/singleline"
android:background=
"@drawable/singleline"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<Image
View
<Image
Button
android:id=
"@+id/iv_back"
android:id=
"@+id/iv_back"
android:layout_width=
"
@dimen/title_height
"
android:layout_width=
"
?attr/actionBarSize
"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/transparent"
android:gravity=
"center"
android:gravity=
"center"
android:onClick=
"@{onClickListener}"
android:onClick=
"@{onClickListener}"
android:padding=
"
16dp
"
android:padding=
"
@dimen/all_margin
"
android:src=
"@mipmap/back_white"
/>
android:src=
"@mipmap/back_white"
/>
<TextView
<TextView
...
...
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