Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
xxsq
Commits
cafe7e84
Commit
cafe7e84
authored
Jun 29, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :1.1.3 [实现方案] :隐藏现金签到
parent
2bdc3af0
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
82 additions
and
39 deletions
+82
-39
RechargeActivity.kt
...ain/java/com/zxbw/modulemain/activity/RechargeActivity.kt
+3
-1
RechargeAdapter.kt
.../main/java/com/zxbw/modulemain/adapter/RechargeAdapter.kt
+68
-35
activity_layout_recharge.xml
moduleMain/src/main/res/layout/activity_layout_recharge.xml
+1
-0
item_layout_recharge.xml
moduleMain/src/main/res/layout/item_layout_recharge.xml
+1
-1
item_layout_recharge_hide.xml
moduleMain/src/main/res/layout/item_layout_recharge_hide.xml
+7
-0
view_navigation_bottom.xml
moduleMain/src/main/res/layout/view_navigation_bottom.xml
+1
-0
AdManager.kt
moduleZxAd/src/main/java/com/zx/ad/AdManager.kt
+1
-2
No files found.
moduleMain/src/main/java/com/zxbw/modulemain/activity/RechargeActivity.kt
View file @
cafe7e84
...
...
@@ -7,6 +7,7 @@ import android.text.TextUtils
import
android.util.Log
import
android.view.View
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.zxbw.modulemain.R
import
com.zxbw.modulemain.adapter.OperatorAdapter
import
com.zxbw.modulemain.adapter.RechargeAdapter
...
...
@@ -103,7 +104,8 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
mPresenter
=
RechargePresenter
(
this
)
mAdapter
=
RechargeAdapter
(
this
,
this
)
id_rl_recharge
?.
layoutManager
=
GridLayoutManager
(
this
,
3
)
// id_rl_recharge?.layoutManager = GridLayoutManager(this, 3)
id_rl_recharge
?.
layoutManager
=
LinearLayoutManager
(
this
,
LinearLayoutManager
.
HORIZONTAL
,
false
)
id_rl_recharge
?.
adapter
=
mAdapter
mPresenter
?.
getFetchCard
()
// mPresenter?.getPayList("mobileFee")
...
...
moduleMain/src/main/java/com/zxbw/modulemain/adapter/RechargeAdapter.kt
View file @
cafe7e84
...
...
@@ -18,13 +18,16 @@ import com.zxhl.cms.net.model.video.MemberEntity
import
com.zxhl.cms.utils.OnRecycleItemClickListener
class
RechargeAdapter
:
BaseRecyclerAdapter
<
MemberEntity
.
ProductDetail
,
RechargeAdapter
.
ViewHolder
>
{
BaseRecyclerAdapter
<
MemberEntity
.
ProductDetail
,
RecyclerView
.
ViewHolder
>
{
private
val
VIEW_TYPE_HIDE_VIEW
=
-
1
private
var
mContext
:
Activity
?
=
null
private
val
listener
:
OnRecycleItemClickListener
<
MemberEntity
.
ProductDetail
>
private
val
mSelectColor
:
Int
private
val
mUnSelectColor
:
Int
private
var
position
=
-
1
private
var
price
:
String
?=
""
private
var
price
:
String
?
=
""
constructor
(
content
:
Activity
?,
listener
:
OnRecycleItemClickListener
<
MemberEntity
.
ProductDetail
>
...
...
@@ -40,20 +43,30 @@ class RechargeAdapter :
notifyDataSetChanged
()
}
fun
updateData
(
discountprice
:
String
)
{
price
=
discountprice
fun
updateData
(
discountprice
:
String
)
{
price
=
discountprice
notifyDataSetChanged
()
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
pos
:
Int
)
{
override
fun
getItemViewType
(
position
:
Int
):
Int
{
if
(
position
==
0
)
{
return
VIEW_TYPE_HIDE_VIEW
;
}
else
{
return
super
.
getItemViewType
(
position
)
}
}
override
fun
onBindViewHolder
(
holder
:
RecyclerView
.
ViewHolder
,
pos
:
Int
)
{
var
bean
=
mList
[
pos
]
if
(
holder
is
ItemViewHolder
)
{
holder
.
id_tv_activity_price_text
?.
text
=
"活动价"
holder
.
id_tv_price
?.
text
=
"${bean.cash}"
if
(
pos
==
position
)
{
if
(!
TextUtils
.
isEmpty
(
price
)){
Log
.
e
(
"MXL"
,
"更新ui"
)
holder
.
id_tv_activity_price_text
?.
text
=
"已减${price}元"
holder
.
id_tv_price
?.
text
=
"${bean.cash?.toDoubleOrNull()?.minus(price?.toDoubleOrNull()!!)}"
if
(!
TextUtils
.
isEmpty
(
price
))
{
Log
.
e
(
"MXL"
,
"更新ui"
)
holder
.
id_tv_activity_price_text
?.
text
=
"已减${price}元"
holder
.
id_tv_price
?.
text
=
"${bean.cash?.toDoubleOrNull()?.minus(price?.toDoubleOrNull()!!)}"
}
holder
.
id_ll_item
?.
setBackgroundResource
(
R
.
drawable
.
shape_edd49d_r6
)
...
...
@@ -72,9 +85,12 @@ class RechargeAdapter :
holder
.
id_tv_rmb
?.
setTextColor
(
mUnSelectColor
)
}
holder
.
id_tv_orgin_price
?.
text
=
"原价 ¥${bean.originalPrice}"
holder
.
id_tv_orgin_price
?.
getPaint
()
?.
setFlags
(
Paint
.
STRIKE_THRU_TEXT_FLAG
)
}
else
{
}
}
...
...
@@ -82,14 +98,22 @@ class RechargeAdapter :
// return 3
// }
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
return
ViewHolder
(
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
if
(
viewType
==
VIEW_TYPE_HIDE_VIEW
)
{
return
HideViewHolder
(
LayoutInflater
.
from
(
AppContext
.
get
())
.
inflate
(
R
.
layout
.
item_layout_recharge_hide
,
parent
,
false
)
)
}
else
{
return
ItemViewHolder
(
LayoutInflater
.
from
(
AppContext
.
get
())
.
inflate
(
R
.
layout
.
item_layout_recharge
,
parent
,
false
)
)
}
inner
class
ViewHolder
:
RecyclerView
.
ViewHolder
{
}
inner
class
ItemViewHolder
:
RecyclerView
.
ViewHolder
{
var
id_ll_item
:
LinearLayout
?
// var id_goods_icon: RecycleImageView?
...
...
@@ -98,7 +122,6 @@ class RechargeAdapter :
var
id_tv_price
:
TextView
?
var
id_tv_orgin_price
:
TextView
?
constructor
(
itemView
:
View
)
:
super
(
itemView
)
{
...
...
@@ -120,4 +143,14 @@ class RechargeAdapter :
}
}
}
//空白
class
HideViewHolder
:
RecyclerView
.
ViewHolder
{
constructor
(
itemView
:
View
)
:
super
(
itemView
)
{
}
}
}
\ No newline at end of file
moduleMain/src/main/res/layout/activity_layout_recharge.xml
View file @
cafe7e84
...
...
@@ -164,6 +164,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/id_rl_recharge"
android:layout_width=
"match_parent"
android:layout_marginLeft=
"5dp"
android:layout_height=
"wrap_content"
/>
<LinearLayout
...
...
moduleMain/src/main/res/layout/item_layout_recharge.xml
View file @
cafe7e84
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/id_ll_item"
android:layout_width=
"
match_parent
"
android:layout_width=
"
100dp
"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"8dp"
android:layout_marginRight=
"8dp"
...
...
moduleMain/src/main/res/layout/item_layout_recharge_hide.xml
0 → 100644
View file @
cafe7e84
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
>
</RelativeLayout>
moduleMain/src/main/res/layout/view_navigation_bottom.xml
View file @
cafe7e84
...
...
@@ -33,6 +33,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_weight=
"1"
android:visibility=
"gone"
android:drawableTop=
"@drawable/icon_bottom_cash_default"
android:drawablePadding=
"2dp"
android:textStyle=
"bold"
...
...
moduleZxAd/src/main/java/com/zx/ad/AdManager.kt
View file @
cafe7e84
...
...
@@ -62,11 +62,10 @@ object AdManager {
}
fun
init
(
application
:
Context
,
appLs
:
String
)
{
LogUtils
.
isShowLog
(
tru
e
)
LogUtils
.
isShowLog
(
fals
e
)
AdNetConfig
.
setBase_Url
(
AdNetConfig
.
Environment
.
PRODUCT
)
AdConstant
.
param
.
mPacketName
=
application
.
packageName
AdConstant
.
param
.
appLs
=
appLs
AdConstant
.
param
.
appLs
=
appLs
ZXADClient
.
adApi
.
getADConfig
(
AdConstant
.
param
.
mPacketName
)
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
List
<
AdIdConfig
>?>()
{
...
...
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