Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
starlight
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
王雪伟
starlight
Commits
908d8119
Commit
908d8119
authored
Apr 15, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :加入充值页和详情页 [实现方案] :
parent
36c98d7e
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
854 additions
and
28 deletions
+854
-28
VipPayActivity.kt
cms/src/main/java/com/zxhl/cms/pay/view/VipPayActivity.kt
+3
-1
RounterApi.kt
cms/src/main/java/com/zxhl/cms/router/RounterApi.kt
+5
-2
JumpUtils.java
cms/src/main/java/com/zxhl/cms/utils/JumpUtils.java
+15
-1
FlowLayout.java
cms/src/main/java/com/zxhl/cms/widget/FlowLayout.java
+172
-0
AndroidManifest.xml
moduleMain/src/main/AndroidManifest.xml
+10
-0
UserDetailsActivity.kt
...n/java/com/zxhl/main/page/activity/UserDetailsActivity.kt
+97
-0
UserPhotosAdapter.kt
...main/java/com/zxhl/main/page/adapter/UserPhotosAdapter.kt
+72
-0
UserDetailsContract.kt
...n/java/com/zxhl/main/page/contract/UserDetailsContract.kt
+17
-0
SplashPresenter.kt
...main/java/com/zxhl/main/page/presenter/SplashPresenter.kt
+25
-22
UserDetailsPresenter.kt
...java/com/zxhl/main/page/presenter/UserDetailsPresenter.kt
+47
-0
icon_aboutme.png
moduleMain/src/main/res/drawable-xhdpi/icon_aboutme.png
+0
-0
icon_bioqian.png
moduleMain/src/main/res/drawable-xhdpi/icon_bioqian.png
+0
-0
icon_fanhui_yuan.png
moduleMain/src/main/res/drawable-xhdpi/icon_fanhui_yuan.png
+0
-0
icon_jubao_yuan.png
moduleMain/src/main/res/drawable-xhdpi/icon_jubao_yuan.png
+0
-0
icon_nv.png
moduleMain/src/main/res/drawable-xhdpi/icon_nv.png
+0
-0
icon_shipin_call.png
moduleMain/src/main/res/drawable-xhdpi/icon_shipin_call.png
+0
-0
icon_xiaoxi.png
moduleMain/src/main/res/drawable-xhdpi/icon_xiaoxi.png
+0
-0
shape_03c160_r5.xml
moduleMain/src/main/res/drawable/shape_03c160_r5.xml
+9
-0
shape_bd8aff_ff2cf5_r25.xml
moduleMain/src/main/res/drawable/shape_bd8aff_ff2cf5_r25.xml
+12
-0
shape_eae1ff_r3.xml
moduleMain/src/main/res/drawable/shape_eae1ff_r3.xml
+5
-0
shape_ff3b95_r5.xml
moduleMain/src/main/res/drawable/shape_ff3b95_r5.xml
+9
-0
shape_ff85cc_e633a9_r25.xml
moduleMain/src/main/res/drawable/shape_ff85cc_e633a9_r25.xml
+12
-0
activity_layout_user_details_hw.xml
...n/src/main/res/layout/activity_layout_user_details_hw.xml
+325
-0
item_layout_user_photo.xml
moduleMain/src/main/res/layout/item_layout_user_photo.xml
+15
-0
UserCenterFragment.kt
...main/java/com/zxhl/uc/page/fragment/UserCenterFragment.kt
+4
-2
No files found.
cms/src/main/java/com/zxhl/cms/pay/view/VipPayActivity.kt
View file @
908d8119
...
...
@@ -85,7 +85,9 @@ class VipPayActivity : BaseActivity(), VipPayContract.View,
JumpUtils
.
paymentPageJump
(
Constant
.
Key
.
PAY_TYPE_VIP
,
"1"
,
"vip"
,
"9.9"
)
}
id_img_back
->
{
finish
()
CenterDialog
.
showPayExitDialog
(
this
)
{
finish
()
}
}
}
}
...
...
cms/src/main/java/com/zxhl/cms/router/RounterApi.kt
View file @
908d8119
...
...
@@ -206,9 +206,12 @@ interface RounterApi {
@RounterUri
(
Constant
.
scheme
+
"://userdetail"
)
fun
getIntentActivityUserDetail
(
@RounterParam
(
"userId"
)
userId
:
String
,
@RounterParam
(
"detailfree"
)
detailfree
:
String
)
)
:
Intent
:
Intent
@RounterUri
(
Constant
.
scheme
+
"://userdetail_hw"
)
fun
getIntentActivityUserDetailsHw
(
@RounterParam
(
"userId"
)
userId
:
String
,
@RounterParam
(
"detailfree"
)
detailfree
:
String
):
Intent
@RounterUri
(
Constant
.
scheme
+
"://video_result"
)
fun
getIntentActivityVideoResult
(
@RounterParam
(
"url"
)
str
:
String
):
Intent
...
...
cms/src/main/java/com/zxhl/cms/utils/JumpUtils.java
View file @
908d8119
...
...
@@ -104,8 +104,19 @@ public class JumpUtils {
}
public
static
void
UserDetailJump
(
String
userId
,
String
detailfree
)
{
UserDetailsHwJump
(
userId
,
detailfree
);
// try {
// Intent intent = RounterBus.getRounter(RounterApi.class).getIntentActivityUserDetail(userId, detailfree);
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// AppContext.get().startActivity(intent);
// } catch (Exception e) {
// Utils.showToast(AppContext.get(), "This version is not supported, please update the version!");
// }
}
public
static
void
UserDetailsHwJump
(
String
userId
,
String
detailfree
)
{
try
{
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentActivityUserDetail
(
userId
,
detailfree
);
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentActivityUserDetail
sHw
(
userId
,
detailfree
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
AppContext
.
get
().
startActivity
(
intent
);
}
catch
(
Exception
e
)
{
...
...
@@ -212,6 +223,7 @@ public class JumpUtils {
Utils
.
showToast
(
AppContext
.
get
(),
"This version is not supported, please update the version!"
);
}
}
public
static
void
BlockListJump
()
{
try
{
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentBlockList
();
...
...
@@ -221,6 +233,7 @@ public class JumpUtils {
Utils
.
showToast
(
AppContext
.
get
(),
"该版本暂不支持,请更新版本!"
);
}
}
public
static
void
UpdateNickNameJump
()
{
try
{
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentUpdateNickName
();
...
...
@@ -230,6 +243,7 @@ public class JumpUtils {
Utils
.
showToast
(
AppContext
.
get
(),
"该版本暂不支持,请更新版本!"
);
}
}
public
static
void
UpdateIntrodutionJump
()
{
try
{
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentUpdateIntrodution
();
...
...
cms/src/main/java/com/zxhl/cms/widget/FlowLayout.java
0 → 100644
View file @
908d8119
package
com
.
zxhl
.
cms
.
widget
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author (wangXuewei)
* @datetime 2022-04-15 17:16 GMT+8
* @detail :
*/
public
class
FlowLayout
extends
ViewGroup
{
public
FlowLayout
(
Context
context
)
{
this
(
context
,
null
);
}
public
FlowLayout
(
Context
context
,
AttributeSet
attrs
)
{
this
(
context
,
attrs
,
0
);
}
public
FlowLayout
(
Context
context
,
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
context
,
attrs
,
defStyleAttr
);
}
private
List
<
List
<
View
>>
mLineViews
=
new
ArrayList
<
List
<
View
>>();
private
List
<
Integer
>
mLineHeight
=
new
ArrayList
<
Integer
>();
/**
* 测量所有子View大小,确定ViewGroup的宽高
*
* @param widthMeasureSpec
* @param heightMeasureSpec
*/
@Override
protected
void
onMeasure
(
int
widthMeasureSpec
,
int
heightMeasureSpec
)
{
super
.
onMeasure
(
widthMeasureSpec
,
heightMeasureSpec
);
//由于onMeasure会执行多次,避免重复的计算控件个数和高度,这里需要进行清空操作
mLineViews
.
clear
();
mLineHeight
.
clear
();
//获取测量的模式和尺寸大小
int
widthMode
=
MeasureSpec
.
getMode
(
widthMeasureSpec
);
int
widthSize
=
MeasureSpec
.
getSize
(
widthMeasureSpec
)-
getPaddingLeft
()-
getPaddingRight
();
int
heightMode
=
MeasureSpec
.
getMode
(
heightMeasureSpec
);
int
heightSize
=
MeasureSpec
.
getSize
(
heightMeasureSpec
)+
getPaddingTop
()+
getPaddingBottom
();
//记录ViewGroup真实的测量宽高
int
viewGroupWidth
=
0
-
getPaddingLeft
()-
getPaddingRight
();
int
viewGroupHeight
=
getPaddingTop
()+
getPaddingBottom
();
if
(
widthMode
==
MeasureSpec
.
EXACTLY
&&
heightMode
==
MeasureSpec
.
EXACTLY
)
{
viewGroupWidth
=
widthSize
;
viewGroupHeight
=
heightSize
;
}
else
{
//当前所占的宽高
int
currentLineWidth
=
0
;
int
currentLineHeight
=
0
;
//用来存储每一行上的子View
List
<
View
>
lineView
=
new
ArrayList
<
View
>();
int
childViewsCount
=
getChildCount
();
for
(
int
i
=
0
;
i
<
childViewsCount
;
i
++)
{
View
childView
=
getChildAt
(
i
);
//对子View进行测量
measureChild
(
childView
,
widthMeasureSpec
,
heightMeasureSpec
);
MarginLayoutParams
marginLayoutParams
=
(
MarginLayoutParams
)
childView
.
getLayoutParams
();
int
childViewWidth
=
childView
.
getMeasuredWidth
()
+
marginLayoutParams
.
leftMargin
+
marginLayoutParams
.
rightMargin
;
int
childViewHeight
=
childView
.
getMeasuredHeight
()
+
marginLayoutParams
.
topMargin
+
marginLayoutParams
.
bottomMargin
;
if
(
currentLineWidth
+
childViewWidth
>
widthSize
)
{
//当前行宽+子View+左右外边距>ViewGroup的宽度,换行
viewGroupWidth
=
Math
.
max
(
currentLineWidth
,
widthSize
);
viewGroupHeight
+=
currentLineHeight
;
//添加行高
mLineHeight
.
add
(
currentLineHeight
);
//添加行对象
mLineViews
.
add
(
lineView
);
//new新的一行
lineView
=
new
ArrayList
<
View
>();
//添加行对象里的子View
lineView
.
add
(
childView
);
currentLineWidth
=
childViewWidth
;
}
else
{
//当前行宽+子View+左右外边距<=ViewGroup的宽度,不换行
currentLineWidth
+=
childViewWidth
;
currentLineHeight
=
Math
.
max
(
currentLineHeight
,
childViewHeight
);
//添加行对象里的子View
lineView
.
add
(
childView
);
}
if
(
i
==
childViewsCount
-
1
)
{
//最后一个子View的时候
//添加行对象
mLineViews
.
add
(
lineView
);
viewGroupWidth
=
Math
.
max
(
childViewWidth
,
viewGroupWidth
);
viewGroupHeight
+=
childViewHeight
;
//添加行高
mLineHeight
.
add
(
currentLineHeight
);
}
}
}
setMeasuredDimension
(
viewGroupWidth
,
viewGroupHeight
);
}
/**
* 设置ViewGroup里子View的具体位置
*
* @param changed
* @param l
* @param t
* @param r
* @param b
*/
@Override
protected
void
onLayout
(
boolean
changed
,
int
l
,
int
t
,
int
r
,
int
b
)
{
int
left
=
getPaddingLeft
();
int
top
=
getPaddingTop
();
//一共有几行
int
lines
=
mLineViews
.
size
();
for
(
int
i
=
0
;
i
<
lines
;
i
++)
{
//每行行高
int
lineHeight
=
mLineHeight
.
get
(
i
);
//行内有几个子View
List
<
View
>
viewList
=
mLineViews
.
get
(
i
);
int
views
=
viewList
.
size
();
for
(
int
j
=
0
;
j
<
views
;
j
++)
{
View
view
=
viewList
.
get
(
j
);
MarginLayoutParams
marginLayoutParams
=
(
MarginLayoutParams
)
view
.
getLayoutParams
();
int
vl
=
left
+
marginLayoutParams
.
leftMargin
;
int
vt
=
top
+
marginLayoutParams
.
topMargin
;
int
vr
=
vl
+
view
.
getMeasuredWidth
();
int
vb
=
vt
+
view
.
getMeasuredHeight
();
view
.
layout
(
vl
,
vt
,
vr
,
vb
);
left
+=
view
.
getMeasuredWidth
()
+
marginLayoutParams
.
leftMargin
+
marginLayoutParams
.
rightMargin
;
}
left
=
getPaddingLeft
();
top
+=
lineHeight
;
}
}
/**
* 指定ViewGroup的LayoutParams
*
* @param attrs
* @return
*/
@Override
public
LayoutParams
generateLayoutParams
(
AttributeSet
attrs
)
{
return
new
MarginLayoutParams
(
getContext
(),
attrs
);
}
}
moduleMain/src/main/AndroidManifest.xml
View file @
908d8119
...
...
@@ -72,6 +72,16 @@
android:scheme=
"hwxg"
/>
</intent-filter>
</activity>
<activity
android:name=
"com.zxhl.main.page.activity.UserDetailsActivity"
>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<data
android:host=
"userdetail_hw"
android:scheme=
"hwxg"
/>
</intent-filter>
</activity>
<activity
android:name=
"com.zxhl.main.page.activity.UserInfoActivity"
>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
...
...
moduleMain/src/main/java/com/zxhl/main/page/activity/UserDetailsActivity.kt
0 → 100644
View file @
908d8119
package
com.zxhl.main.page.activity
import
android.view.View
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.zxhl.cms.AppContext
import
com.zxhl.cms.common.base.BaseActivity
import
com.zxhl.cms.net.model.box.HomeListEntity
import
com.zxhl.cms.utils.OnRecycleItemClickListener
import
com.zxhl.main.R
import
com.zxhl.main.page.adapter.UserPhotosAdapter
import
com.zxhl.main.page.contract.UserDetailsContract
import
com.zxhl.main.page.presenter.UserDetailsPresenter
import
kotlinx.android.synthetic.main.activity_layout_user_details_hw.*
/**
* @author (wangXuewei)
* @datetime 2022-04-15 10:48 GMT+8
* @detail :海外新版用户详情
*/
class
UserDetailsActivity
:
BaseActivity
(),
UserDetailsContract
.
View
,
OnRecycleItemClickListener
<
String
>
{
private
var
userId
:
String
?
=
""
private
var
detailfree
:
String
?
=
""
private
var
mPhotoAdapter
:
UserPhotosAdapter
?
=
null
;
private
var
mPresenter
:
UserDetailsPresenter
?
=
null
override
fun
before
()
{
super
.
before
()
setStatusBarBackground
(
AppContext
.
get
().
resources
.
getColor
(
R
.
color
.
transparent
))
}
override
fun
init
()
{
userId
=
intent
?.
data
?.
getQueryParameter
(
"userId"
)
?:
""
detailfree
=
intent
?.
data
?.
getQueryParameter
(
"detailfree"
)
?:
""
mPhotoAdapter
=
UserPhotosAdapter
(
this
,
this
)
mPresenter
=
UserDetailsPresenter
(
this
)
id_rcl_user_details_photo_list
.
layoutManager
=
LinearLayoutManager
(
this
,
LinearLayoutManager
.
HORIZONTAL
,
false
)
id_rcl_user_details_photo_list
.
adapter
=
mPhotoAdapter
id_img_btn_back
.
setOnClickListener
(
this
)
id_img_btn_report
.
setOnClickListener
(
this
)
id_img_user_details_sms
.
setOnClickListener
(
this
)
id_ll_user_details_call_video
.
setOnClickListener
(
this
)
mPresenter
?.
getUserDetails
(
userId
,
detailfree
)
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
)
{
id_img_btn_back
->
{
finish
()
}
id_img_btn_report
->
{
showToast
(
"report"
)
}
id_img_user_details_sms
->
{
showToast
(
"sms"
)
}
id_ll_user_details_call_video
->
{
showToast
(
"call video"
)
}
}
}
override
fun
layoutID
():
Int
{
return
R
.
layout
.
activity_layout_user_details_hw
}
override
fun
setUserDetails
(
result
:
HomeListEntity
)
{
//Name
id_tv_user_details_name
.
text
=
result
.
nickname
mPhotoAdapter
?.
clear
()
mPhotoAdapter
?.
appendToList
(
result
.
picturesList
)
//
if
(!
result
.
picturesList
.
isNullOrEmpty
())
{
onItemClick
(
id_img_user_details_photo
,
0
,
result
.
picturesList
!!
[
0
])
}
}
override
fun
followCallBack
(
boolean
:
Boolean
)
{
}
override
fun
onItemClick
(
view
:
View
?,
position
:
Int
,
data
:
String
?)
{
mPhotoAdapter
?.
setSelectPhoto
(
position
)
id_img_user_details_photo
.
setLoadImageUrl
(
data
,
true
)
}
}
\ No newline at end of file
moduleMain/src/main/java/com/zxhl/main/page/adapter/UserPhotosAdapter.kt
0 → 100644
View file @
908d8119
package
com.zxhl.main.page.adapter
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.RelativeLayout
import
androidx.recyclerview.widget.RecyclerView
import
com.zxhl.cms.common.base.BaseRecyclerAdapter
import
com.zxhl.cms.utils.OnRecycleItemClickListener
import
com.zxhl.cms.widget.RecycleImageView
import
com.zxhl.main.R
import
kotlinx.android.synthetic.main.activity_layout_user_details_hw.*
/**
* @author (wangXuewei)
* @datetime 2022-04-15 18:10 GMT+8
* @detail :
*/
class
UserPhotosAdapter
:
BaseRecyclerAdapter
<
String
,
RecyclerView
.
ViewHolder
>
{
private
var
mPosition
:
Int
=
0
private
var
mContext
:
Context
?
=
null
private
val
listener
:
OnRecycleItemClickListener
<
String
>
constructor
(
content
:
Context
?,
listener
:
OnRecycleItemClickListener
<
String
>
)
:
super
()
{
this
.
listener
=
listener
mContext
=
content
}
fun
setSelectPhoto
(
pos
:
Int
)
{
mPosition
=
pos
;
notifyDataSetChanged
()
}
override
fun
onCreateViewHolder
(
holder
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
return
ViewHolder
(
LayoutInflater
.
from
(
holder
.
context
)
.
inflate
(
R
.
layout
.
item_layout_user_photo
,
holder
,
false
)
)
}
override
fun
onBindViewHolder
(
holder
:
RecyclerView
.
ViewHolder
,
position
:
Int
)
{
if
(
holder
is
ViewHolder
)
{
val
data
=
mList
[
position
]
holder
.
item_photo
.
setLoadImageUrl
(
data
,
R
.
drawable
.
pano_sdk_bad_request_error
,
5
)
if
(
mPosition
==
position
)
{
holder
.
item_view
.
background
=
mContext
?.
getDrawable
(
R
.
drawable
.
shape_ffffff_r5
)
}
else
{
holder
.
item_view
.
background
=
null
}
holder
.
item_view
.
setOnClickListener
{
listener
.
onItemClick
(
it
,
position
,
data
)
}
}
}
inner
class
ViewHolder
:
RecyclerView
.
ViewHolder
{
val
item_view
:
RelativeLayout
;
val
item_photo
:
RecycleImageView
;
constructor
(
itemView
:
View
)
:
super
(
itemView
)
{
item_view
=
itemView
.
findViewById
(
R
.
id
.
id_rl_item_user_photo_view
)
item_photo
=
itemView
.
findViewById
(
R
.
id
.
id_img_item_user_photo
)
}
}
}
\ No newline at end of file
moduleMain/src/main/java/com/zxhl/main/page/contract/UserDetailsContract.kt
0 → 100644
View file @
908d8119
package
com.zxhl.main.page.contract
import
com.zxhl.cms.net.model.box.HomeListEntity
import
com.zxhl.cms.net.model.chat.DistanceEntity
class
UserDetailsContract
{
interface
View
{
fun
setUserDetails
(
result
:
HomeListEntity
)
fun
followCallBack
(
boolean
:
Boolean
)
}
interface
Presenter
{
fun
getUserDetails
(
id
:
String
?,
free
:
String
?)
fun
followUser
(
uid
:
String
?)
}
}
\ No newline at end of file
moduleMain/src/main/java/com/zxhl/main/page/presenter/SplashPresenter.kt
View file @
908d8119
...
...
@@ -97,33 +97,36 @@ class SplashPresenter : SplashContract.Presenter {
val
user
=
SettingPreference
.
getUserInfoData
()
val
token
=
SettingPreference
.
getUserToken
()
if
(
user
==
null
&&
TextUtils
.
isEmpty
(
token
))
{
getAds
()
//getAds()
mView
.
jumpMainPage
()
}
else
{
UserDataUtils
.
updateUserInfo
(
null
)
getAds
()
UserDataUtils
.
updateUserInfo
{
_
,
_
->
//getAds()
mView
.
jumpMainPage
()
}
}
}
private
fun
deviceLogin
()
{
ApiClient
.
userInfoAPi
.
deviceLogin
().
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
UserInfo
>()
{
override
fun
onSuccess
(
result
:
UserInfo
)
{
val
token
=
result
.
token
SettingPreference
.
saveToken
(
token
)
UserDataUtils
.
updateUserInfo
(
null
)
// mView?.jumpMainPage()
getAds
()
}
override
fun
onFailure
(
e
:
Throwable
,
code
:
String
,
errorMsg
:
String
)
{
SettingPreference
.
saveToken
(
""
)
SettingPreference
.
saveUserInfo
(
null
)
getAds
()
}
})
}
//
private fun deviceLogin() {
//
ApiClient.userInfoAPi.deviceLogin().compose(RxSchedulers.observableIO2Main())
//
.subscribe(object : BaseObserver<UserInfo>() {
//
override fun onSuccess(result: UserInfo) {
//
val token = result.token
//
SettingPreference.saveToken(token)
//
UserDataUtils.updateUserInfo(null)
//
//
//
mView?.jumpMainPage()
//
getAds()
//
}
//
//
override fun onFailure(e: Throwable, code: String, errorMsg: String) {
//
SettingPreference.saveToken("")
//
SettingPreference.saveUserInfo(null)
//
getAds()
//
}
//
})
//
}
private
fun
getAds
()
{
ApiClient
.
adApi
.
getAds
(
"splash"
)
...
...
moduleMain/src/main/java/com/zxhl/main/page/presenter/UserDetailsPresenter.kt
0 → 100644
View file @
908d8119
package
com.zxhl.main.page.presenter
import
android.util.Log
import
com.zxhl.cms.net.ApiClient
import
com.zxhl.cms.net.RxSchedulers
import
com.zxhl.cms.net.callback.BaseObserver
import
com.zxhl.cms.net.model.box.HomeListEntity
import
com.zxhl.main.page.contract.UserDetailsContract
class
UserDetailsPresenter
:
UserDetailsContract
.
Presenter
{
private
val
mView
:
UserDetailsContract
.
View
constructor
(
mView
:
UserDetailsContract
.
View
)
{
this
.
mView
=
mView
}
override
fun
getUserDetails
(
id
:
String
?,
free
:
String
?)
{
ApiClient
.
homeApi
.
getUserInfo
(
id
,
free
).
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
HomeListEntity
>()
{
override
fun
onSuccess
(
result
:
HomeListEntity
?)
{
if
(
result
!=
null
)
{
mView
.
setUserDetails
(
result
)
}
}
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?)
{
}
})
}
override
fun
followUser
(
uid
:
String
?)
{
ApiClient
.
homeApi
.
followUser
(
uid
).
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
Any
>()
{
override
fun
onSuccess
(
result
:
Any
?)
{
mView
.
followCallBack
(
true
)
}
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?)
{
Log
.
e
(
"MXL"
,
"ERROR"
+
code
+
errorMsg
)
}
})
}
}
\ No newline at end of file
moduleMain/src/main/res/drawable-xhdpi/icon_aboutme.png
0 → 100644
View file @
908d8119
1.15 KB
moduleMain/src/main/res/drawable-xhdpi/icon_bioqian.png
0 → 100644
View file @
908d8119
922 Bytes
moduleMain/src/main/res/drawable-xhdpi/icon_fanhui_yuan.png
0 → 100644
View file @
908d8119
1.19 KB
moduleMain/src/main/res/drawable-xhdpi/icon_jubao_yuan.png
0 → 100644
View file @
908d8119
632 Bytes
moduleMain/src/main/res/drawable-xhdpi/icon_nv.png
0 → 100644
View file @
908d8119
360 Bytes
moduleMain/src/main/res/drawable-xhdpi/icon_shipin_call.png
0 → 100644
View file @
908d8119
4.04 KB
moduleMain/src/main/res/drawable-xhdpi/icon_xiaoxi.png
0 → 100644
View file @
908d8119
3.86 KB
moduleMain/src/main/res/drawable/shape_03c160_r5.xml
0 → 100644
View file @
908d8119
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#03C160"
/>
<corners
android:bottomLeftRadius=
"0dp"
android:bottomRightRadius=
"5dp"
android:topLeftRadius=
"5dp"
android:topRightRadius=
"0dp"
/>
</shape>
\ No newline at end of file
moduleMain/src/main/res/drawable/shape_bd8aff_ff2cf5_r25.xml
0 → 100644
View file @
908d8119
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
android:angle=
"90"
android:endColor=
"#ffBD8AFF"
android:startColor=
"#ff662CF5"
android:type=
"linear"
android:useLevel=
"true"
/>
<corners
android:radius=
"25dp"
/>
</shape>
\ No newline at end of file
moduleMain/src/main/res/drawable/shape_eae1ff_r3.xml
0 → 100644
View file @
908d8119
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#EAE1FF"
/>
<corners
android:radius=
"3dp"
/>
</shape>
\ No newline at end of file
moduleMain/src/main/res/drawable/shape_ff3b95_r5.xml
0 → 100644
View file @
908d8119
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#FF3B95"
/>
<corners
android:bottomLeftRadius=
"0dp"
android:bottomRightRadius=
"5dp"
android:topLeftRadius=
"5dp"
android:topRightRadius=
"0dp"
/>
</shape>
\ No newline at end of file
moduleMain/src/main/res/drawable/shape_ff85cc_e633a9_r25.xml
0 → 100644
View file @
908d8119
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
android:angle=
"90"
android:endColor=
"#ffFF85CC"
android:startColor=
"#ffE633A9"
android:type=
"linear"
android:useLevel=
"true"
/>
<corners
android:radius=
"25dp"
/>
</shape>
\ No newline at end of file
moduleMain/src/main/res/layout/activity_layout_user_details_hw.xml
0 → 100644
View file @
908d8119
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingBottom=
"70dp"
>
<SurfaceView
android:id=
"@+id/id_sfv_user_detail_video"
android:layout_width=
"match_parent"
android:layout_height=
"320dp"
android:visibility=
"gone"
/>
<com.zxhl.cms.widget.RecycleImageView
android:id=
"@+id/id_img_user_details_photo"
android:layout_width=
"match_parent"
android:layout_height=
"320dp"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/id_rcl_user_details_photo_list"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/id_img_user_details_photo"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
android:layout_marginBottom=
"10dp"
/>
<TextView
android:id=
"@+id/id_tv_user_details_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/id_img_user_details_photo"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"10dp"
android:text=
"Marry"
android:textColor=
"@color/color_333333"
android:textSize=
"15sp"
android:textStyle=
"bold"
/>
<LinearLayout
android:id=
"@+id/id_ll_user_details_info"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/id_tv_user_details_name"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"5dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/id_img_national_flag"
android:layout_width=
"20dp"
android:layout_height=
"14dp"
android:layout_marginRight=
"8.5dp"
/>
<TextView
android:id=
"@+id/id_tv_user_details_age"
android:layout_width=
"wrap_content"
android:layout_height=
"14dp"
android:layout_marginRight=
"8.5dp"
android:background=
"@drawable/shape_ff3b95_r5"
android:drawableLeft=
"@drawable/icon_nv"
android:drawablePadding=
"2.5dp"
android:gravity=
"center"
android:paddingLeft=
"5dp"
android:paddingRight=
"5dp"
android:text=
"27"
android:textColor=
"@color/white"
android:textSize=
"11sp"
/>
<TextView
android:id=
"@+id/id_tv_user_details_online"
android:layout_width=
"wrap_content"
android:layout_height=
"14dp"
android:layout_marginRight=
"8.5dp"
android:background=
"@drawable/shape_03c160_r5"
android:gravity=
"center"
android:paddingLeft=
"5dp"
android:paddingRight=
"5dp"
android:text=
"Online"
android:textColor=
"@color/white"
android:textSize=
"11sp"
/>
<TextView
android:id=
"@+id/id_tv_user_details_percentage"
android:layout_width=
"wrap_content"
android:layout_height=
"14dp"
android:layout_marginRight=
"8.5dp"
android:background=
"@drawable/shape_03c160_r5"
android:gravity=
"center"
android:paddingLeft=
"5dp"
android:paddingRight=
"5dp"
android:text=
"90%"
android:textColor=
"@color/white"
android:textSize=
"11sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/id_tv_about_me"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/id_ll_user_details_info"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"20dp"
android:drawableLeft=
"@drawable/icon_aboutme"
android:drawablePadding=
"5dp"
android:gravity=
"center"
android:text=
"About me"
android:textColor=
"@color/color_333333"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/id_tv_user_details_introduction"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/id_tv_about_me"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"10dp"
android:text=
"Naughty most od the times"
android:textColor=
"@color/color_666666"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/id_tv_personal_tag"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/id_tv_user_details_introduction"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"20dp"
android:drawableLeft=
"@drawable/icon_bioqian"
android:drawablePadding=
"5dp"
android:gravity=
"center"
android:text=
"Personal tag"
android:textColor=
"@color/color_333333"
android:textSize=
"14sp"
/>
<com.zxhl.cms.widget.FlowLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/id_tv_personal_tag"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:background=
"@drawable/shape_eae1ff_r3"
android:paddingLeft=
"5dp"
android:paddingTop=
"2.5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2.5dp"
android:text=
"Introvert"
android:textColor=
"#824FFF"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:background=
"@drawable/shape_eae1ff_r3"
android:paddingLeft=
"5dp"
android:paddingTop=
"2.5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2.5dp"
android:text=
"Extrovert"
android:textColor=
"#824FFF"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:background=
"@drawable/shape_eae1ff_r3"
android:paddingLeft=
"5dp"
android:paddingTop=
"2.5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2.5dp"
android:text=
"Bold"
android:textColor=
"#824FFF"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:background=
"@drawable/shape_eae1ff_r3"
android:paddingLeft=
"5dp"
android:paddingTop=
"2.5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2.5dp"
android:text=
"Hardworking"
android:textColor=
"#824FFF"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:background=
"@drawable/shape_eae1ff_r3"
android:paddingLeft=
"5dp"
android:paddingTop=
"2.5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2.5dp"
android:text=
"Deligent"
android:textColor=
"#824FFF"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:background=
"@drawable/shape_eae1ff_r3"
android:paddingLeft=
"5dp"
android:paddingTop=
"2.5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2.5dp"
android:text=
"Coquetry"
android:textColor=
"#824FFF"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:background=
"@drawable/shape_eae1ff_r3"
android:paddingLeft=
"5dp"
android:paddingTop=
"2.5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2.5dp"
android:text=
"watch movie"
android:textColor=
"#824FFF"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:background=
"@drawable/shape_eae1ff_r3"
android:paddingLeft=
"5dp"
android:paddingTop=
"2.5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2.5dp"
android:text=
"adventure"
android:textColor=
"#824FFF"
/>
</com.zxhl.cms.widget.FlowLayout>
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
<ImageView
android:id=
"@+id/id_img_btn_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"40dp"
android:src=
"@drawable/icon_fanhui_yuan"
/>
<ImageView
android:id=
"@+id/id_img_btn_report"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginTop=
"40dp"
android:layout_marginRight=
"20dp"
android:src=
"@drawable/icon_jubao_yuan"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginBottom=
"20dp"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/id_img_user_details_sms"
android:layout_width=
"0dp"
android:layout_height=
"45dp"
android:layout_marginRight=
"10dp"
android:layout_weight=
"1"
android:background=
"@drawable/shape_ff85cc_e633a9_r25"
android:scaleType=
"centerInside"
android:src=
"@drawable/icon_xiaoxi"
/>
<LinearLayout
android:id=
"@+id/id_ll_user_details_call_video"
android:layout_width=
"0dp"
android:layout_height=
"45dp"
android:layout_weight=
"2"
android:background=
"@drawable/shape_bd8aff_ff2cf5_r25"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/icon_shipin"
/>
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_marginRight=
"5dp"
android:src=
"@drawable/icon_xingbi_da_wode"
/>
<TextView
android:id=
"@+id/id_tv_user_details_call_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"60/min"
android:textColor=
"@color/white"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
moduleMain/src/main/res/layout/item_layout_user_photo.xml
0 → 100644
View file @
908d8119
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/id_rl_item_user_photo_view"
android:layout_width=
"62dp"
android:layout_height=
"62dp"
android:layout_marginLeft=
"4dp"
android:layout_marginRight=
"4dp"
>
<com.zxhl.cms.widget.RecycleImageView
android:id=
"@+id/id_img_item_user_photo"
android:layout_width=
"60dp"
android:layout_centerInParent=
"true"
android:layout_height=
"60dp"
/>
</RelativeLayout>
\ No newline at end of file
moduleUc/src/main/java/com/zxhl/uc/page/fragment/UserCenterFragment.kt
View file @
908d8119
...
...
@@ -102,10 +102,12 @@ class UserCenterFragment : BaseFragment(), AdCallback<String>,
.
setLoadingUIProvider
(
CustomLoadingUIProvider
())
// 自定义LoadingUI
mAdapter
=
PublishPhotoAdapter
(
mActivity
,
this
,
this
)
id_ll_pay_vip
?.
setOnClickListener
{
JumpUtils
.
payJump
()
// JumpUtils.payJump()
JumpUtils
.
becomeVipJump
()
}
id_ll_star_coin
?.
setOnClickListener
{
JumpUtils
.
starCoinpayJump
()
// JumpUtils.starCoinpayJump()
JumpUtils
.
coinStoreJump
()
}
id_rl_voice_room
?.
setOnClickListener
{
JumpUtils
.
VoiceRoomJump
()
...
...
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