Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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_vedio
Commits
447910b6
Commit
447910b6
authored
Sep 11, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
4fe678f9
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
391 additions
and
357 deletions
+391
-357
AndroidManifest.xml
video/app/src/main/AndroidManifest.xml
+6
-1
HomePresenter.kt
.../java/com/mints/helivideo/mvp/presenters/HomePresenter.kt
+1
-92
HomeView.kt
...p/src/main/java/com/mints/helivideo/mvp/views/HomeView.kt
+0
-4
WxLoginActivity.kt
.../java/com/mints/helivideo/ui/activitys/WxLoginActivity.kt
+204
-0
TopAdapter.kt
...rc/main/java/com/mints/helivideo/ui/adapter/TopAdapter.kt
+3
-27
MainFragment.kt
...main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
+12
-126
activity_wx_login.xml
video/app/src/main/res/layout/activity_wx_login.xml
+100
-0
fragment_main.xml
video/app/src/main/res/layout/fragment_main.xml
+30
-41
item_rv_top.xml
video/app/src/main/res/layout/item_rv_top.xml
+35
-66
ic_wx_white_login.png
video/app/src/main/res/mipmap-xhdpi/ic_wx_white_login.png
+0
-0
No files found.
video/app/src/main/AndroidManifest.xml
View file @
447910b6
...
@@ -103,7 +103,12 @@
...
@@ -103,7 +103,12 @@
android:exported=
"false"
android:exported=
"false"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.WxLoginActivity"
android:configChanges=
"orientation|screenSize|keyboardHidden"
android:exported=
"false"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
/>
<activity
<activity
android:name=
".ui.activitys.MainActivity"
android:name=
".ui.activitys.MainActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:configChanges=
"orientation|keyboardHidden|screenSize"
...
...
video/app/src/main/java/com/mints/helivideo/mvp/presenters/HomePresenter.kt
View file @
447910b6
...
@@ -67,7 +67,6 @@ class HomePresenter : BasePresenter<HomeView>() {
...
@@ -67,7 +67,6 @@ class HomePresenter : BasePresenter<HomeView>() {
when
(
code
)
{
when
(
code
)
{
200
->
{
200
->
{
view
.
topTabsSuc
(
baseResponse
.
data
)
view
.
topTabsSuc
(
baseResponse
.
data
)
showTurn
()
}
}
else
->
{
else
->
{
view
.
showToast
(
message
)
view
.
showToast
(
message
)
...
@@ -77,46 +76,9 @@ class HomePresenter : BasePresenter<HomeView>() {
...
@@ -77,46 +76,9 @@ class HomePresenter : BasePresenter<HomeView>() {
})
})
}
}
private
fun
showTurn
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
showTurn
(),
object
:
BaseSubscriber
<
BaseResponse
<
NineShowBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
NineShowBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
val
data
=
baseResponse
.
data
if
(
data
!=
null
)
{
view
.
showTurnSuc
(
data
)
// AppPreferencesManager.get()
// .put(Constant.LUCKY_FLAG, data.isShow)
// AppPreferencesManager.get()
// .put(Constant.LUCKY_COMPLETE, data.complete)
// AppPreferencesManager.get()
// .put(Constant.LUCKY_NEED, data.need)
}
}
}
}
override
fun
onError
(
e
:
Throwable
?)
{
if
(
isLinkView
)
return
}
})
}
fun
orders
()
{
fun
orders
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
orders
(),
.
call
(
loanService
.
history
(),
object
:
BaseSubscriber
<
BaseResponse
<
BannerList
>>()
{
object
:
BaseSubscriber
<
BaseResponse
<
BannerList
>>()
{
override
fun
onCompleted
()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
...
@@ -224,57 +186,4 @@ class HomePresenter : BasePresenter<HomeView>() {
...
@@ -224,57 +186,4 @@ class HomePresenter : BasePresenter<HomeView>() {
}
}
})
})
}
}
fun
getSoltVedio
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getSoltVedio
(),
object
:
BaseSubscriber
<
BaseResponse
<
IndexList
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
IndexList
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
getSoltVedioSuc
(
baseResponse
.
data
)
}
}
}
})
}
fun
getRecommendVedio
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getRecommendVedio
(),
object
:
BaseSubscriber
<
BaseResponse
<
RecoBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
RecoBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
when
(
code
)
{
200
->
{
view
.
getRecommendVedioSuc
(
baseResponse
.
data
)
}
}
}
})
}
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/mvp/views/HomeView.kt
View file @
447910b6
...
@@ -7,8 +7,4 @@ interface HomeView : BaseView {
...
@@ -7,8 +7,4 @@ interface HomeView : BaseView {
fun
getHomeV1MsgSuc
(
data
:
HotStyleTypesList
)
fun
getHomeV1MsgSuc
(
data
:
HotStyleTypesList
)
fun
topTabsSuc
(
data
:
BannerList
?)
fun
topTabsSuc
(
data
:
BannerList
?)
fun
ordersSuc
(
data
:
BannerList
?)
fun
ordersSuc
(
data
:
BannerList
?)
fun
getSoltVedioSuc
(
data
:
IndexList
?)
fun
getRecommendVedioSuc
(
data
:
RecoBean
?)
fun
showTurnSuc
(
data
:
NineShowBean
)
}
}
video/app/src/main/java/com/mints/helivideo/ui/activitys/WxLoginActivity.kt
0 → 100644
View file @
447910b6
package
com.mints.helivideo.ui.activitys
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.text.TextPaint
import
android.text.style.ClickableSpan
import
android.view.View
import
androidx.core.content.ContextCompat
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.mints.helivideo.MintsApplication
import
com.mints.helivideo.R
import
com.mints.helivideo.common.Constant
import
com.mints.helivideo.login.LoginApi
import
com.mints.helivideo.login.OnLoginListener
import
com.mints.helivideo.mvp.model.WXInfo
import
com.mints.helivideo.mvp.presenters.LoginPresenter
import
com.mints.helivideo.mvp.views.LoginView
import
com.mints.helivideo.ui.activitys.base.BaseActivity
import
com.mints.helivideo.utils.CommonUtils
import
com.mints.helivideo.utils.SpanUtils
import
com.mints.helivideo.utils.ToastUtil
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_wx_login.*
/**
* 描述:微信登录
* 作者:孟崔广
* 时间:2020/12/2 13:50
*/
class
WxLoginActivity
:
BaseActivity
(),
LoginView
,
View
.
OnClickListener
,
OnLoginListener
{
private
val
loginPresenter
by
lazy
{
LoginPresenter
()
}
private
val
loginApi
by
lazy
{
LoginApi
()
}
private
var
wxInfo
:
WXInfo
?
=
null
private
var
channel
:
String
=
""
private
var
isCheckAgree
=
false
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_wx_login
override
fun
toggleOverridePendingTransition
()
=
true
override
fun
getOverridePendingTransitionMode
()
=
TransitionMode
.
BOTTOM
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
initViewsAndEvents
()
{
loginPresenter
.
attachView
(
this
)
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
initView
()
initListener
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
loginApi
.
setOnLoginListener
(
null
)
loginPresenter
.
detachView
()
}
override
fun
finish
()
{
super
.
finish
()
//关闭窗体动画显示
overridePendingTransition
(
0
,
R
.
anim
.
push_bottom_out
)
}
override
fun
onClick
(
v
:
View
?)
{
if
(
AntiShake
.
check
(
v
?.
id
))
return
when
(
v
?.
id
)
{
R
.
id
.
ivLoginBack
->
{
finish
()
}
R
.
id
.
tvLoginMobile
->
{
readyGo
(
MobileLoginActivity
::
class
.
java
)
}
R
.
id
.
rlLoginWx
->
{
if
(!
isCheckAgree
)
{
ToastUtil
.
showLong
(
context
,
"请勾选同意后再进行登录"
)
llWxloginCheck
.
postDelayed
({
YoYo
.
with
(
Techniques
.
Shake
).
duration
(
500
).
repeat
(
2
).
playOn
(
llWxloginCheck
)
},
200
)
return
}
val
wechat
=
ShareSDK
.
getPlatform
(
Wechat
.
NAME
)
if
(!
wechat
.
isClientValid
)
{
showToast
(
"请先安装微信"
)
return
}
// RxPermissions(this)
// .request(Manifest.permission.READ_PHONE_STATE)
// .subscribe { granted: Boolean ->
// if (granted) {
// loginApi.setOnLoginListener(this@WxLoginActivity)
// loginApi.setPlatform(Wechat.NAME)
// loginApi.login(this@WxLoginActivity)
// } else {
// showMissingPermissionDialog("设备")
// }
// }
loginApi
.
setOnLoginListener
(
this
@WxLoginActivity
)
loginApi
.
setPlatform
(
Wechat
.
NAME
)
loginApi
.
login
(
this
@WxLoginActivity
)
// readyGo(TestActivity::class.java)
}
}
}
override
fun
loginSuc
()
{
showToast
(
"登录成功"
)
hideLoading
()
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
readyGoThenKill
(
MainActivity
::
class
.
java
)
},
1000
)
}
override
fun
sendCodeSuc
()
{
}
override
fun
mergeAccount
(
mobile
:
String
,
wxOpenId
:
String
,
key
:
String
)
{
}
override
fun
onLogin
(
platform
:
String
?,
res
:
HashMap
<
String
,
Any
>):
Boolean
{
try
{
wxInfo
=
WXInfo
()
wxInfo
?.
let
{
it
.
unionid
=
res
[
"unionid"
].
toString
()
+
""
it
.
openid
=
res
[
"openid"
].
toString
()
+
""
it
.
province
=
res
[
"province"
].
toString
()
+
""
it
.
city
=
res
[
"city"
].
toString
()
+
""
it
.
country
=
res
[
"country"
].
toString
()
+
""
it
.
headimgurl
=
res
[
"headimgurl"
].
toString
()
+
""
it
.
nickname
=
res
[
"nickname"
].
toString
()
+
""
it
.
sex
=
(
res
[
"sex"
].
toString
()
+
""
).
toInt
()
}
if
(!
isFinishing
)
{
loginPresenter
.
login
(
JsonUtil
.
toJson
(
wxInfo
))
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
return
false
}
private
fun
initView
()
{
SpanUtils
.
with
(
tvLoginAgreement
)
.
append
(
"已阅读并同意"
)
.
append
(
"《用户注册协议》"
).
setClickSpan
(
object
:
ClickableSpan
()
{
override
fun
onClick
(
widget
:
View
)
{
val
bundle
=
Bundle
()
bundle
.
putString
(
WebActivity
.
WEB_TITLE
,
getString
(
R
.
string
.
register_name
))
bundle
.
putString
(
WebActivity
.
WEB_URL
,
Constant
.
REGISTER_URL
)
readyGo
(
WebActivity
::
class
.
java
,
bundle
)
}
override
fun
updateDrawState
(
ds
:
TextPaint
)
{
ds
.
color
=
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
color_FF9837
)
ds
.
isUnderlineText
=
false
}
})
.
append
(
"、"
)
.
append
(
"《用户隐私协议》"
).
setClickSpan
(
object
:
ClickableSpan
()
{
override
fun
onClick
(
widget
:
View
)
{
val
bundle
=
Bundle
()
bundle
.
putString
(
WebActivity
.
WEB_TITLE
,
getString
(
R
.
string
.
privacy_name
))
bundle
.
putString
(
WebActivity
.
WEB_URL
,
Constant
.
PRIVACY_URL
)
readyGo
(
WebActivity
::
class
.
java
,
bundle
)
}
override
fun
updateDrawState
(
ds
:
TextPaint
)
{
ds
.
color
=
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
color_FF9837
)
ds
.
isUnderlineText
=
false
}
})
.
append
(
"与您的利益切身相关。请您注册前务必仔细阅读!"
)
.
create
()
}
private
fun
initListener
()
{
ivLoginBack
.
setOnClickListener
(
this
)
tvLoginMobile
.
setOnClickListener
(
this
)
rlLoginWx
.
setOnClickListener
(
this
)
wxloginCheck
.
setOnCheckedChangeListener
{
buttonView
,
isChecked
->
this
.
isCheckAgree
=
isChecked
}
}
}
video/app/src/main/java/com/mints/helivideo/ui/adapter/TopAdapter.kt
View file @
447910b6
...
@@ -22,10 +22,9 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
...
@@ -22,10 +22,9 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
inner
class
ViewHolder
(
view
:
View
)
:
RecyclerView
.
ViewHolder
(
view
)
{
inner
class
ViewHolder
(
view
:
View
)
:
RecyclerView
.
ViewHolder
(
view
)
{
val
rlTopItemRoot
:
LinearLayout
=
view
.
findViewById
(
R
.
id
.
rlTopItemRoot
)
val
rlTopItemRoot
:
LinearLayout
=
view
.
findViewById
(
R
.
id
.
rlTopItemRoot
)
val
ivTopItem
:
ImageView
=
view
.
findViewById
(
R
.
id
.
ivTopItem
)
val
ivTopItem
:
ImageView
=
view
.
findViewById
(
R
.
id
.
ivTopItem
)
val
tvTopItemLable
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvTopItemLable
)
val
tvTopItemCount
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvTopItemCount
)
val
tvTopItemTitle
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvTopItemTitle
)
val
tvTopItemTitle
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvTopItemTitle
)
val
tvTopItemText
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvTopItemText
)
val
tvTopItemText
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvTopItemText
)
val
tvTopCurText
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvTopCurText
)
}
}
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
...
@@ -38,17 +37,9 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
...
@@ -38,17 +37,9 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
val
topBean
=
topList
?.
get
(
position
)
val
topBean
=
topList
?.
get
(
position
)
if
(
topBean
!=
null
)
{
if
(
topBean
!=
null
)
{
holder
.
tvTopItemLable
.
text
=
"${position + 1}"
holder
.
tvTopItemCount
.
text
=
topBean
.
showNum
holder
.
tvTopItemTitle
.
text
=
"${topBean.title}"
holder
.
tvTopItemTitle
.
text
=
"${topBean.title}"
if
(
topBean
.
orderTags
!=
null
&&
topBean
.
orderTags
.
size
>
0
)
{
holder
.
tvTopItemText
.
text
=
"共${topBean.freeIndex}集"
val
sb
=
StringBuilder
()
holder
.
tvTopCurText
.
text
=
"观看至第${topBean.seeIndex}集"
for
(
i
in
0
until
topBean
.
orderTags
.
size
)
{
sb
.
append
(
topBean
.
orderTags
.
get
(
i
)
+
" "
)
}
holder
.
tvTopItemText
.
text
=
"${sb}"
}
GlideUtils
.
loadImageViewGifForCenterCrop
(
GlideUtils
.
loadImageViewGifForCenterCrop
(
context
,
context
,
topBean
.
coverImage
,
topBean
.
coverImage
,
...
@@ -56,21 +47,6 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
...
@@ -56,21 +47,6 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
)
)
}
}
when
(
position
)
{
0
->
{
holder
.
tvTopItemLable
.
setBackgroundResource
(
R
.
mipmap
.
y43
)
}
1
->
{
holder
.
tvTopItemLable
.
setBackgroundResource
(
R
.
mipmap
.
y42
)
}
2
->
{
holder
.
tvTopItemLable
.
setBackgroundResource
(
R
.
mipmap
.
y41
)
}
else
->
{
holder
.
tvTopItemLable
.
setBackgroundResource
(
R
.
mipmap
.
y4
)
}
}
holder
.
rlTopItemRoot
.
setOnClickListener
{
holder
.
rlTopItemRoot
.
setOnClickListener
{
mOnItemClickListener
.
onItemClick
(
position
)
mOnItemClickListener
.
onItemClick
(
position
)
}
}
...
...
video/app/src/main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
View file @
447910b6
This diff is collapsed.
Click to expand it.
video/app/src/main/res/layout/activity_wx_login.xml
0 → 100644
View file @
447910b6
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:tools=
"http://schemas.android.com/tools"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/ivLoginBack"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"25dp"
android:paddingTop=
"40dp"
android:paddingRight=
"25dp"
android:paddingBottom=
"10dp"
android:scaleType=
"center"
android:src=
"@mipmap/ic_activity_quit"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<ImageView
android:layout_width=
"70dp"
android:layout_height=
"70dp"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"50dp"
android:src=
"@mipmap/ic_launcher_main"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_marginBottom=
"30dp"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/rlLoginWx"
android:layout_width=
"match_parent"
android:layout_height=
"52dp"
android:layout_gravity=
"center_horizontal"
android:layout_marginLeft=
"40dp"
android:layout_marginTop=
"230dp"
android:layout_marginRight=
"40dp"
android:background=
"@drawable/shape_green"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:drawableLeft=
"@mipmap/ic_wx_white_login"
android:drawablePadding=
"10dp"
android:gravity=
"center_vertical"
android:text=
"微信登录"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
</RelativeLayout>
<TextView
android:id=
"@+id/tvLoginMobile"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:padding=
"24dp"
android:text=
"其他登录方式"
android:textColor=
"@color/gray"
android:textSize=
"14sp"
/>
<LinearLayout
android:id=
"@+id/llWxloginCheck"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<CheckBox
android:id=
"@+id/wxloginCheck"
android:layout_width=
"wrap_content"
android:layout_marginLeft=
"20dp"
android:gravity=
"center"
android:checked=
"false"
android:layout_gravity=
"center_vertical"
android:layout_height=
"wrap_content"
></CheckBox>
<TextView
android:id=
"@+id/tvLoginAgreement"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginRight=
"30dp"
android:layout_marginLeft=
"2dp"
tools:text=
"123123123123123123123123123123123123123123123123123123123123123123"
android:textColor=
"#707A8D"
android:textSize=
"12sp"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
video/app/src/main/res/layout/fragment_main.xml
View file @
447910b6
...
@@ -76,16 +76,36 @@
...
@@ -76,16 +76,36 @@
android:background=
"@drawable/shape_bg_write"
android:background=
"@drawable/shape_bg_write"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
>
android:layout_marginLeft=
"6dp"
android:layout_marginTop=
"10dp"
<TextView
android:layout_marginBottom=
"10dp"
android:layout_width=
"wrap_content"
android:text=
"排行榜"
android:layout_height=
"wrap_content"
android:textColor=
"@color/black"
android:layout_marginLeft=
"6dp"
android:textSize=
"16sp"
android:layout_marginTop=
"10dp"
android:textStyle=
"bold"
/>
android:layout_marginBottom=
"10dp"
android:text=
"最近观看"
android:textColor=
"@color/black"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_main_watchmore"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginLeft=
"6dp"
android:layout_marginTop=
"14dp"
android:layout_marginRight=
"10dp"
android:layout_marginBottom=
"10dp"
android:text=
"查看更多"
android:textColor=
"@color/gray"
android:textSize=
"12sp"
android:textStyle=
"bold"
/>
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_main_list"
android:id=
"@+id/rv_main_list"
...
@@ -243,35 +263,4 @@
...
@@ -243,35 +263,4 @@
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_lucky"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
android:layout_marginEnd=
"10dp"
android:layout_marginBottom=
"120dp"
android:gravity=
"center"
android:orientation=
"vertical"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
>
<ImageView
android:id=
"@+id/iv_lucky_gif"
android:layout_width=
"80dp"
android:layout_height=
"70dp"
android:src=
"@mipmap/ic_get_mobile"
/>
<TextView
android:id=
"@+id/tv_lucky_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"6dp"
android:background=
"@drawable/shape_bg_black2"
android:paddingLeft=
"16dp"
android:paddingRight=
"16dp"
android:text=
"0/5"
android:textColor=
"@color/white"
android:textSize=
"12sp"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
video/app/src/main/res/layout/item_rv_top.xml
View file @
447910b6
...
@@ -3,84 +3,53 @@
...
@@ -3,84 +3,53 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/rlTopItemRoot"
android:id=
"@+id/rlTopItemRoot"
android:layout_width=
"
110dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"3dp"
android:layout_marginLeft=
"3dp"
android:layout_marginRight=
"3dp"
android:layout_marginRight=
"3dp"
android:orientation=
"
vertic
al"
>
android:orientation=
"
horizont
al"
>
<FrameLayout
<ImageView
android:id=
"@+id/ivTopItem"
android:layout_width=
"110dp"
android:layout_width=
"110dp"
android:layout_height=
"150dp"
>
android:layout_height=
"120dp"
android:scaleType=
"fitXY"
/>
<ImageView
<LinearLayout
android:id=
"@+id/ivTopItem"
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"8dp"
android:scaleType=
"fitXY"
/>
android:layout_marginRight=
"20dp"
android:orientation=
"vertical"
>
<TextView
<TextView
android:id=
"@+id/tvTopItemLable"
android:id=
"@+id/tvTopItemTitle"
android:layout_width=
"22dp"
android:layout_width=
"100dp"
android:layout_height=
"22dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"12dp"
android:background=
"@mipmap/y4"
android:singleLine=
"true"
android:gravity=
"center"
android:text=
"我去平行时空"
android:paddingBottom=
"2dp"
android:textColor=
"@color/black"
android:text=
"1"
android:textSize=
"13sp"
/>
android:textColor=
"@color/white"
android:textSize=
"12sp"
android:textStyle=
"bold"
/>
<LinearLayout
<TextView
android:id=
"@+id/tvTopItemText"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_marginTop=
"4dp"
android:background=
"@drawable/bg_shape_twoban"
android:singleLine=
"true"
android:drawableLeft=
"@mipmap/ic_load"
android:textColor=
"@color/gray"
android:drawablePadding=
"4dp"
android:textSize=
"11sp"
/>
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"6dp"
android:src=
"@mipmap/ic_load"
></ImageView>
<TextView
android:id=
"@+id/tvTopItemCount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:paddingLeft=
"6dp"
android:paddingTop=
"2dp"
android:paddingRight=
"8dp"
android:paddingBottom=
"2dp"
android:text=
"143.2万"
android:textColor=
"@color/white"
android:textSize=
"12sp"
/>
</LinearLayout>
</FrameLayout>
<TextView
android:id=
"@+id/tvTopCurText"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:singleLine=
"true"
android:textColor=
"@color/red"
android:textSize=
"11sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tvTopItemTitle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:singleLine=
"true"
android:text=
"我去平行时空"
android:textColor=
"@color/black"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tvTopItemText"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:singleLine=
"true"
android:textColor=
"@color/gray"
android:textSize=
"11sp"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
video/app/src/main/res/mipmap-xhdpi/ic_wx_white_login.png
0 → 100644
View file @
447910b6
1.5 KB
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