Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vediosocial
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vediosocial
Commits
3b33c748
Commit
3b33c748
authored
Feb 20, 2025
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
13befde2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
29 deletions
+35
-29
VipPresenter.kt
...ava/com/duben/loveplayletd/mvp/presenters/VipPresenter.kt
+1
-1
VipActivity.kt
...n/java/com/duben/loveplayletd/ui/activitys/VipActivity.kt
+5
-1
SquareAdapter.kt
...n/java/com/duben/loveplayletd/ui/adapter/SquareAdapter.kt
+19
-16
SquareListFragment.kt
.../com/duben/loveplayletd/ui/fragment/SquareListFragment.kt
+3
-3
fragment_square.xml
video/app/src/main/res/layout/fragment_square.xml
+7
-8
No files found.
video/app/src/main/java/com/duben/loveplayletd/mvp/presenters/VipPresenter.kt
View file @
3b33c748
...
@@ -209,7 +209,7 @@ class VipPresenter : BasePresenter<VipView>() {
...
@@ -209,7 +209,7 @@ class VipPresenter : BasePresenter<VipView>() {
val
code
:
Int
=
baseResponse
.
getStatus
()
val
code
:
Int
=
baseResponse
.
getStatus
()
when
(
code
)
{
when
(
code
)
{
200
->
{
200
->
{
view
.
getVipPayParamsSuc
(
"ALIPAY"
,
baseResponse
.
data
,
enter
)
view
.
getVipPayParamsSuc
(
payChannel
,
baseResponse
.
data
,
enter
)
}
}
else
->
{
else
->
{
...
...
video/app/src/main/java/com/duben/loveplayletd/ui/activitys/VipActivity.kt
View file @
3b33c748
...
@@ -70,7 +70,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
...
@@ -70,7 +70,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
const
val
IS_MAIN
=
"IS_MAIN"
//是否从首页进入
const
val
IS_MAIN
=
"IS_MAIN"
//是否从首页进入
const
val
IS_RECOMMEND
=
"IS_RECOMMEND"
//是否从推荐页进入
const
val
IS_RECOMMEND
=
"IS_RECOMMEND"
//是否从推荐页进入
const
val
wxAppId
=
BuildConfig
.
WEIXIN_APP_PAY_ID
const
val
wxAppId
=
BuildConfig
.
WEIXIN_APP_PAY_ID
const
val
WEIXIN_PAY
=
"WEIXIN
_PAY
"
const
val
WEIXIN_PAY
=
"WEIXIN"
const
val
ALIPAY
=
"ALIPAY"
const
val
ALIPAY
=
"ALIPAY"
const
val
THIRD_ID
=
"THIRD_ID"
const
val
THIRD_ID
=
"THIRD_ID"
const
val
VEDIO_ID
=
"VEDIO_ID"
const
val
VEDIO_ID
=
"VEDIO_ID"
...
@@ -310,6 +310,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
...
@@ -310,6 +310,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
if
(!
TextUtils
.
isEmpty
(
bean
.
remarks
))
{
if
(!
TextUtils
.
isEmpty
(
bean
.
remarks
))
{
tv_vip_hint
.
text
=
bean
.
remarks
tv_vip_hint
.
text
=
bean
.
remarks
tv_vip_hint
.
visibility
=
View
.
VISIBLE
tv_vip_hint
.
visibility
=
View
.
VISIBLE
ll_vip_wx
.
visibility
=
View
.
GONE
if
(
bean
.
isShowCycTips
)
{
if
(
bean
.
isShowCycTips
)
{
tv_vip_hint
.
setTextColor
(
Color
.
parseColor
(
"#FFAC5E"
))
tv_vip_hint
.
setTextColor
(
Color
.
parseColor
(
"#FFAC5E"
))
tv_vip_hint
.
textSize
=
12f
tv_vip_hint
.
textSize
=
12f
...
@@ -318,6 +319,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
...
@@ -318,6 +319,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
tv_vip_hint
.
textSize
=
10f
tv_vip_hint
.
textSize
=
10f
}
}
}
else
{
}
else
{
ll_vip_wx
.
visibility
=
View
.
VISIBLE
tv_vip_hint
.
visibility
=
View
.
GONE
tv_vip_hint
.
visibility
=
View
.
GONE
}
}
if
(
bean
.
isShowCycTips
)
{
if
(
bean
.
isShowCycTips
)
{
...
@@ -554,6 +556,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
...
@@ -554,6 +556,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
val
linearLayoutManager
=
LinearLayoutManager
(
this
)
val
linearLayoutManager
=
LinearLayoutManager
(
this
)
linearLayoutManager
.
orientation
=
LinearLayoutManager
.
HORIZONTAL
linearLayoutManager
.
orientation
=
LinearLayoutManager
.
HORIZONTAL
rvVip
.
layoutManager
=
linearLayoutManager
rvVip
.
layoutManager
=
linearLayoutManager
rvVip
.
setItemViewCacheSize
(
0
)
rvVip
.
isDrawingCacheEnabled
=
false
vipAdapter
=
VipAdapter
(
vipList
)
vipAdapter
=
VipAdapter
(
vipList
)
rvVip
.
adapter
=
vipAdapter
rvVip
.
adapter
=
vipAdapter
vipAdapter
.
setOnItemClickListener
(
this
)
vipAdapter
.
setOnItemClickListener
(
this
)
...
...
video/app/src/main/java/com/duben/loveplayletd/ui/adapter/SquareAdapter.kt
View file @
3b33c748
...
@@ -24,9 +24,10 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
...
@@ -24,9 +24,10 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
HallList
.
ListDTO
)
{
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
HallList
.
ListDTO
)
{
if
(!
item
.
distance
.
isNullOrEmpty
())
{
if
(!
item
.
distance
.
isNullOrEmpty
())
{
if
(
item
.
distance
.
contains
(
"·"
)){
if
(
item
.
distance
.
contains
(
"·"
))
{
holder
.
getView
<
TextView
>(
R
.
id
.
tv_recommend_location
).
text
=
""
+
item
.
distance
+
"KM"
holder
.
getView
<
TextView
>(
R
.
id
.
tv_recommend_location
).
text
=
}
else
{
""
+
item
.
distance
+
"KM"
}
else
{
holder
.
getView
<
TextView
>(
R
.
id
.
tv_recommend_location
).
text
=
""
+
item
.
distance
holder
.
getView
<
TextView
>(
R
.
id
.
tv_recommend_location
).
text
=
""
+
item
.
distance
}
}
}
else
{
}
else
{
...
@@ -98,7 +99,6 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
...
@@ -98,7 +99,6 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
holder
.
getView
<
LinearLayout
>(
R
.
id
.
ll_recommend_root
)
holder
.
getView
<
LinearLayout
>(
R
.
id
.
ll_recommend_root
)
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_black
)
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_black
)
if
(
item
.
headerUrl
!=
null
&&!
TextUtils
.
isEmpty
(
item
.
headerUrl
)){
loadSquareImageView
(
loadSquareImageView
(
context
,
context
,
item
.
headerUrl
,
item
.
headerUrl
,
...
@@ -106,8 +106,6 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
...
@@ -106,8 +106,6 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
isBlur
,
isBlur
,
R
.
mipmap
.
ic_default_avatar_female
R
.
mipmap
.
ic_default_avatar_female
)
)
}
holder
.
getView
<
RelativeLayout
>(
R
.
id
.
rl_album
).
visibility
=
View
.
VISIBLE
holder
.
getView
<
RelativeLayout
>(
R
.
id
.
rl_album
).
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_status
).
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_status
).
visibility
=
View
.
VISIBLE
...
@@ -223,7 +221,7 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
...
@@ -223,7 +221,7 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
fun
loadSquareImageView
(
fun
loadSquareImageView
(
ctx
:
Context
,
ctx
:
Context
,
path
:
String
,
path
:
String
?
,
iv
:
ImageView
,
iv
:
ImageView
,
isBlur
:
Boolean
,
isBlur
:
Boolean
,
defaultImage
:
Int
=
R
.
mipmap
.
ic_default_avatar_male
defaultImage
:
Int
=
R
.
mipmap
.
ic_default_avatar_male
...
@@ -234,8 +232,13 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
...
@@ -234,8 +232,13 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
if
(
UserManager
.
getInstance
().
userSex
!=
1
)
{
if
(
UserManager
.
getInstance
().
userSex
!=
1
)
{
// 用户是女的,看的只有男的
// 用户是女的,看的只有男的
GlideUtils
.
loadThumbRound2ImageView
(
ctx
,
path
,
iv
,
defaultImage
)
GlideUtils
.
loadThumbRound2ImageView
(
ctx
,
path
,
iv
,
defaultImage
)
}
else
{
}
else
{
GlideUtils
.
loadThumbRound2ImageView
(
ctx
,
path
,
iv
,
R
.
mipmap
.
ic_default_avatar_female
)
GlideUtils
.
loadThumbRound2ImageView
(
ctx
,
path
,
iv
,
R
.
mipmap
.
ic_default_avatar_female
)
}
}
}
}
...
...
video/app/src/main/java/com/duben/loveplayletd/ui/fragment/SquareListFragment.kt
View file @
3b33c748
...
@@ -66,9 +66,9 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
...
@@ -66,9 +66,9 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
override
fun
onFragmentResume
()
{
override
fun
onFragmentResume
()
{
super
.
onFragmentResume
()
super
.
onFragmentResume
()
if
(
::
squareAdapter
.
isInitialized
&&
!
squareAdapter
.
isBlur
()
&&
UserManager
.
getInstance
().
vipFlag
)
{
//
if (::squareAdapter.isInitialized && !squareAdapter.isBlur() && UserManager.getInstance().vipFlag) {
squareAdapter
.
setIsBlur
(
true
)
//
squareAdapter.setIsBlur(true)
}
//
}
}
}
override
fun
onFragmentFirstVisible
()
{
override
fun
onFragmentFirstVisible
()
{
...
...
video/app/src/main/res/layout/fragment_square.xml
View file @
3b33c748
...
@@ -15,8 +15,7 @@
...
@@ -15,8 +15,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@android:color/transparent"
android:background=
"@android:color/transparent"
android:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
>
app:layout_behavior=
".ui.widgets.AppBarLayoutBehavior"
>
<com.google.android.material.appbar.CollapsingToolbarLayout
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -93,25 +92,25 @@
...
@@ -93,25 +92,25 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#90000000"
android:background=
"#90000000"
android:
visibility=
"gone
"
android:
orientation=
"vertical
"
android:
orientation=
"vertical
"
>
android:
visibility=
"gone
"
>
<ImageView
<ImageView
android:id=
"@+id/iv_user_next"
android:id=
"@+id/iv_user_next"
android:layout_width=
"330dp"
android:layout_width=
"330dp"
android:layout_centerInParent=
"true"
android:layout_height=
"315dp"
android:layout_height=
"315dp"
android:layout_centerInParent=
"true"
android:src=
"@mipmap/bg_new_girl"
/>
android:src=
"@mipmap/bg_new_girl"
/>
<ImageView
<ImageView
android:visibility=
"gone"
android:id=
"@+id/iv_user_quit"
android:id=
"@+id/iv_user_quit"
android:layout_width=
"40dp"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_height=
"40dp"
android:padding=
"10dp"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
android:src=
"@mipmap/bg_pay_calcel"
/>
android:padding=
"10dp"
android:src=
"@mipmap/bg_pay_calcel"
android:visibility=
"gone"
/>
</RelativeLayout>
</RelativeLayout>
...
...
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