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
3f929fbe
Commit
3f929fbe
authored
Jul 10, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页添加接口、业务逻辑
parent
48c66288
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
329 additions
and
76 deletions
+329
-76
LocalVedioManager.kt
...n/java/com/mints/wisdomclean/manager/LocalVedioManager.kt
+34
-7
BannerList.java
...main/java/com/mints/wisdomclean/mvp/model/BannerList.java
+16
-0
HotStyleListBean.kt
.../java/com/mints/wisdomclean/mvp/model/HotStyleListBean.kt
+2
-4
VedioBean.java
.../main/java/com/mints/wisdomclean/mvp/model/VedioBean.java
+124
-0
HomePresenter.kt
...ava/com/mints/wisdomclean/mvp/presenters/HomePresenter.kt
+65
-1
HomeView.kt
...src/main/java/com/mints/wisdomclean/mvp/views/HomeView.kt
+3
-0
LoanService.java
.../src/main/java/com/mints/wisdomclean/net/LoanService.java
+18
-2
HomeVideoPageAdapter.kt
.../com/mints/wisdomclean/ui/adapter/HomeVideoPageAdapter.kt
+3
-3
TopAdapter.kt
.../main/java/com/mints/wisdomclean/ui/adapter/TopAdapter.kt
+9
-6
MainFragment.kt
...in/java/com/mints/wisdomclean/ui/fragment/MainFragment.kt
+45
-46
MovieFragment.kt
...n/java/com/mints/wisdomclean/ui/fragment/MovieFragment.kt
+3
-1
MyFragment.kt
...main/java/com/mints/wisdomclean/ui/fragment/MyFragment.kt
+2
-1
fragment_main.xml
video/app/src/main/res/layout/fragment_main.xml
+4
-5
fragment_main_my.xml
video/app/src/main/res/layout/fragment_main_my.xml
+1
-0
bg_vip_btn.png
video/app/src/main/res/mipmap-xhdpi/bg_vip_btn.png
+0
-0
ic_quit_white.png
video/app/src/main/res/mipmap-xhdpi/ic_quit_white.png
+0
-0
No files found.
video/app/src/main/java/com/mints/wisdomclean/manager/LocalVedioManager.kt
View file @
3f929fbe
package
com.mints.wisdomclean.manager
import
android.app.Activity
import
android.content.Intent
import
android.os.Bundle
import
android.text.TextUtils
import
com.mints.library.utils.json.JsonUtil
import
com.mints.wisdomclean.common.Constant
import
com.mints.wisdomclean.mvp.model.
Banner
Bean
import
com.mints.wisdomclean.mvp.model.
Vedio
Bean
import
com.mints.wisdomclean.utils.AppPreferencesManager
import
com.mints.wisdomclean.video.DramaApiDetailActivity
import
com.mints.wisdomclean.video.VideoActivity
/**
* 本地视频缓存管理
*/
object
LocalVedioManager
{
var
vedioCache
:
Any
?
=
null
var
vedioCache
:
VedioBean
?
=
null
/**
* 提交当前视频数据
*/
fun
commitVedio
(
data
:
Any
)
{
fun
commitVedio
(
data
:
VedioBean
)
{
cacheVedio
(
data
)
TrackManager
.
getInstance
().
commitVedio
()
}
...
...
@@ -24,7 +29,7 @@ object LocalVedioManager {
/**
* 内存、本地都缓存视频
*/
private
fun
cacheVedio
(
data
:
Any
)
{
private
fun
cacheVedio
(
data
:
VedioBean
)
{
vedioCache
=
data
AppPreferencesManager
.
get
().
put
(
Constant
.
LOCAL_VEDIO
,
JsonUtil
.
toJson
(
data
))
}
...
...
@@ -57,16 +62,38 @@ object LocalVedioManager {
/**
* 展示缓存视频
*/
fun
getCacheVedio
():
Any
?
{
fun
getCacheVedio
():
VedioBean
?
{
if
(
vedioCache
!=
null
)
{
return
vedioCache
as
Any
return
vedioCache
as
VedioBean
}
val
localVedio
=
AppPreferencesManager
.
get
().
getString
(
Constant
.
LOCAL_VEDIO
,
""
)
if
(!
TextUtils
.
isEmpty
(
localVedio
))
{
return
JsonUtil
.
parseJson
(
localVedio
,
Banner
Bean
::
class
.
java
)
return
JsonUtil
.
parseJson
(
localVedio
,
Vedio
Bean
::
class
.
java
)
}
return
null
}
/**
* 根据类型跳转对应视频详情页 [自有或穿山甲]
*/
fun
startVedioDetailActivityForType
(
activity
:
Activity
,
data
:
VedioBean
?)
{
val
bundle
=
Bundle
()
if
(
data
?.
createType
==
1
)
{
//自有短剧
readyGo
(
activity
,
VideoActivity
::
class
.
java
,
bundle
)
}
else
{
//穿山甲短剧
readyGo
(
activity
,
DramaApiDetailActivity
::
class
.
java
,
bundle
)
}
}
fun
readyGo
(
activity
:
Activity
,
clazz
:
Class
<
*
>,
bundle
:
Bundle
)
{
val
intent
=
Intent
(
activity
,
clazz
)
if
(
null
!=
bundle
)
{
intent
.
putExtras
(
bundle
)
}
activity
.
startActivity
(
intent
)
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/wisdomclean/mvp/model/BannerList.java
0 → 100644
View file @
3f929fbe
package
com
.
mints
.
wisdomclean
.
mvp
.
model
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
BannerList
implements
Serializable
{
private
List
<
VedioBean
>
list
;
public
List
<
VedioBean
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
VedioBean
>
list
)
{
this
.
list
=
list
;
}
}
video/app/src/main/java/com/mints/wisdomclean/mvp/model/HotStyleListBean.kt
View file @
3f929fbe
...
...
@@ -35,10 +35,8 @@ data class HotStyleBean(
@SuppressLint
(
"ParcelCreator"
)
@Parcelize
data class
HotStyleTypesBean
(
var
isChecked
:
Boolean
=
false
,
var
title
:
String
=
""
,
var
id
:
Int
=
0
,
var
imageCount
:
Int
=
-
1
,
var
type
:
String
=
""
,
var
torder
:
Int
=
0
)
:
Parcelable
@SuppressLint
(
"ParcelCreator"
)
...
...
video/app/src/main/java/com/mints/wisdomclean/mvp/model/VedioBean.java
0 → 100644
View file @
3f929fbe
package
com
.
mints
.
wisdomclean
.
mvp
.
model
;
import
java.io.Serializable
;
public
class
VedioBean
implements
Serializable
{
private
String
thirdId
;
//穿山甲id
private
int
createType
;
//类型,1,自有剧,2 穿山甲
private
String
title
;
private
String
type
;
private
String
topTabsReamrk
;
private
Object
orderTags
;
private
int
vedioTotal
;
//同穿山甲 total
private
String
vedioDesc
;
private
String
coverImage
;
private
int
completeStatus
;
//完结状态 同穿山接status 0-完结
private
String
scriptName
;
private
String
scriptAuthor
;
private
int
vedioId
;
// 视频id,服务器标识
public
String
getThirdId
()
{
return
thirdId
;
}
public
void
setThirdId
(
String
thirdId
)
{
this
.
thirdId
=
thirdId
;
}
public
int
getCreateType
()
{
return
createType
;
}
public
void
setCreateType
(
int
createType
)
{
this
.
createType
=
createType
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getTopTabsReamrk
()
{
return
topTabsReamrk
;
}
public
void
setTopTabsReamrk
(
String
topTabsReamrk
)
{
this
.
topTabsReamrk
=
topTabsReamrk
;
}
public
Object
getOrderTags
()
{
return
orderTags
;
}
public
void
setOrderTags
(
Object
orderTags
)
{
this
.
orderTags
=
orderTags
;
}
public
int
getVedioTotal
()
{
return
vedioTotal
;
}
public
void
setVedioTotal
(
int
vedioTotal
)
{
this
.
vedioTotal
=
vedioTotal
;
}
public
String
getVedioDesc
()
{
return
vedioDesc
;
}
public
void
setVedioDesc
(
String
vedioDesc
)
{
this
.
vedioDesc
=
vedioDesc
;
}
public
String
getCoverImage
()
{
return
coverImage
;
}
public
void
setCoverImage
(
String
coverImage
)
{
this
.
coverImage
=
coverImage
;
}
public
int
getCompleteStatus
()
{
return
completeStatus
;
}
public
void
setCompleteStatus
(
int
completeStatus
)
{
this
.
completeStatus
=
completeStatus
;
}
public
String
getScriptName
()
{
return
scriptName
;
}
public
void
setScriptName
(
String
scriptName
)
{
this
.
scriptName
=
scriptName
;
}
public
String
getScriptAuthor
()
{
return
scriptAuthor
;
}
public
void
setScriptAuthor
(
String
scriptAuthor
)
{
this
.
scriptAuthor
=
scriptAuthor
;
}
public
int
getVedioId
()
{
return
vedioId
;
}
public
void
setVedioId
(
int
vedioId
)
{
this
.
vedioId
=
vedioId
;
}
}
video/app/src/main/java/com/mints/wisdomclean/mvp/presenters/HomePresenter.kt
View file @
3f929fbe
...
...
@@ -44,6 +44,66 @@ class HomePresenter : BasePresenter<HomeView>() {
})
}
fun
topTabs
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
topTabs
(),
object
:
BaseSubscriber
<
BaseResponse
<
BannerList
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
BannerList
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
topTabsSuc
(
baseResponse
.
data
)
}
else
->
{
view
.
showToast
(
message
)
}
}
}
})
}
fun
orders
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
orders
(),
object
:
BaseSubscriber
<
BaseResponse
<
BannerList
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
BannerList
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
ordersSuc
(
baseResponse
.
data
)
}
else
->
{
view
.
showToast
(
message
)
}
}
}
})
}
/**
* 游客登录
*/
...
...
@@ -115,7 +175,11 @@ class HomePresenter : BasePresenter<HomeView>() {
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
when
(
code
)
{
200
->
getHomeV1Types
()
200
->
{
getHomeV1Types
()
topTabs
()
orders
()
}
}
}
})
...
...
video/app/src/main/java/com/mints/wisdomclean/mvp/views/HomeView.kt
View file @
3f929fbe
package
com.mints.wisdomclean.mvp.views
import
com.mints.wisdomclean.mvp.model.BannerList
import
com.mints.wisdomclean.mvp.model.HotStyleTypesListBean
interface
HomeView
:
BaseView
{
fun
getHomeV1MsgSuc
(
data
:
HotStyleTypesListBean
)
fun
topTabsSuc
(
data
:
BannerList
)
fun
ordersSuc
(
data
:
BannerList
)
}
video/app/src/main/java/com/mints/wisdomclean/net/LoanService.java
View file @
3f929fbe
...
...
@@ -5,9 +5,9 @@ import android.text.TextUtils;
import
com.google.gson.JsonObject
;
import
com.mints.wisdomclean.BuildConfig
;
import
com.mints.wisdomclean.mvp.model.BannerList
;
import
com.mints.wisdomclean.mvp.model.BaseResponse
;
import
com.mints.wisdomclean.mvp.model.HotStyleListBean
;
import
com.mints.wisdomclean.mvp.model.HotStyleMsgBean
;
import
com.mints.wisdomclean.mvp.model.HotStyleTypesListBean
;
import
com.mints.wisdomclean.mvp.model.OrderRecordBean
;
import
com.mints.wisdomclean.mvp.model.UserBean
;
...
...
@@ -165,7 +165,7 @@ public interface LoanService {
*
* @return
*/
@POST
(
"api/
ai/homeV1T
ypes"
)
@POST
(
"api/
vedio/t
ypes"
)
Observable
<
BaseResponse
<
HotStyleTypesListBean
>>
getHomeV1Types
();
/**
...
...
@@ -184,6 +184,22 @@ public interface LoanService {
@POST
(
"api/feedback"
)
Observable
<
BaseResponse
<
Object
>>
feedback
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 轮播图
*
* @return
*/
@POST
(
"api/vedio/topTabs"
)
Observable
<
BaseResponse
<
BannerList
>>
topTabs
();
/**
* 排行榜
*
* @return
*/
@POST
(
"api/vedio/orders"
)
Observable
<
BaseResponse
<
BannerList
>>
orders
();
/**
* 默认http工厂
*/
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/adapter/HomeVideoPageAdapter.kt
View file @
3f929fbe
...
...
@@ -14,7 +14,7 @@ class HomeVideoPageAdapter(
private
val
fragments
=
mutableMapOf
<
Int
,
Fragment
>()
override
fun
getItemId
(
position
:
Int
):
Long
{
return
data
[
position
].
id
.
toLong
()
return
data
[
position
].
torder
.
toLong
()
}
override
fun
getItemCount
()
=
data
.
size
...
...
@@ -23,14 +23,14 @@ class HomeVideoPageAdapter(
val
fragment
=
fragments
[
position
]
if
(
fragment
!=
null
)
return
fragment
val
newFragment
=
MovieFragment
.
newInstance
(
data
[
position
].
id
,
position
)
val
newFragment
=
MovieFragment
.
newInstance
(
data
[
position
].
torder
,
position
)
fragments
[
position
]
=
newFragment
return
newFragment
}
override
fun
containsItem
(
itemId
:
Long
):
Boolean
{
data
.
forEach
{
if
(
it
.
id
.
toLong
()
==
itemId
)
{
if
(
it
.
torder
.
toLong
()
==
itemId
)
{
return
true
}
}
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/adapter/TopAdapter.kt
View file @
3f929fbe
...
...
@@ -10,9 +10,9 @@ import android.widget.TextView
import
androidx.recyclerview.widget.RecyclerView
import
com.mints.library.utils.GlideUtils
import
com.mints.wisdomclean.R
import
com.mints.wisdomclean.mvp.model.V
ip
Bean
import
com.mints.wisdomclean.mvp.model.V
edio
Bean
class
TopAdapter
(
val
vipList
:
MutableList
<
VipBean
.
List
Bean
>?)
:
class
TopAdapter
(
val
topList
:
MutableList
<
Vedio
Bean
>?)
:
RecyclerView
.
Adapter
<
TopAdapter
.
ViewHolder
>()
{
lateinit
var
context
:
Context
...
...
@@ -36,9 +36,13 @@ class TopAdapter(val vipList: MutableList<VipBean.ListBean>?) :
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
// val
vipBean = vi
pList[position]
// val
topBean = to
pList[position]
holder
.
tvTopItemLable
.
text
=
"${position + 1}"
GlideUtils
.
loadImageViewGifForFitCenter
(
context
,
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg-bcurd/img/bg_vip_top1.png"
,
holder
.
ivTopItem
)
GlideUtils
.
loadImageViewGifForFitCenter
(
context
,
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg-bcurd/img/bg_vip_top1.png"
,
holder
.
ivTopItem
)
when
(
position
)
{
...
...
@@ -64,8 +68,7 @@ class TopAdapter(val vipList: MutableList<VipBean.ListBean>?) :
holder
.
itemView
.
setTag
(
position
)
}
// override fun getItemCount() = vipList?.size
override
fun
getItemCount
()
=
20
override
fun
getItemCount
()
=
topList
?.
size
?:
0
interface
OnItemClickListener
{
fun
onItemClick
(
position
:
Int
)
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/MainFragment.kt
View file @
3f929fbe
...
...
@@ -17,10 +17,7 @@ import com.mints.wisdomclean.common.AppConfig
import
com.mints.wisdomclean.common.Constant
import
com.mints.wisdomclean.manager.LocalVedioManager
import
com.mints.wisdomclean.manager.UserManager
import
com.mints.wisdomclean.mvp.model.BannerBean
import
com.mints.wisdomclean.mvp.model.HotStyleTypesBean
import
com.mints.wisdomclean.mvp.model.HotStyleTypesListBean
import
com.mints.wisdomclean.mvp.model.UserBean
import
com.mints.wisdomclean.mvp.model.*
import
com.mints.wisdomclean.mvp.presenters.HomePresenter
import
com.mints.wisdomclean.mvp.views.HomeView
import
com.mints.wisdomclean.ui.adapter.HomeVideoPageAdapter
...
...
@@ -46,15 +43,10 @@ import kotlin.concurrent.schedule
*/
class
MainFragment
:
LazyLoadBaseFragment
(),
HomeView
,
View
.
OnClickListener
,
OnRefreshListener
{
var
imageUrls
=
listOf
(
"http://static.mints-pkg.mints-id.com/pkg-bcurd/bg_main_banner23.png"
,
"http://static.mints-pkg.mints-id.com/pkg-bcurd/bg_main_banner21.png"
,
"http://static.mints-pkg.mints-id.com/pkg-bcurd/bg_main_banner24.png"
)
private
var
mSelectTabIndex
=
-
1
private
val
tabsData
=
mutableListOf
<
HotStyleTypesBean
>()
private
val
bannerList
=
mutableListOf
<
BannerBean
>()
private
val
topList
=
mutableListOf
<
VedioBean
>()
private
var
vpAdapter
:
HomeVideoPageAdapter
?
=
null
private
var
topAdapter
:
TopAdapter
?
=
null
...
...
@@ -68,7 +60,6 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
override
fun
onFragmentFirstVisible
()
{
initView
()
initVp
()
initListener
()
loadData
()
...
...
@@ -96,21 +87,6 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
banner
?.
stop
()
}
private
fun
initView
()
{
for
(
i
in
0
until
imageUrls
.
size
)
{
val
bean
=
BannerBean
()
bean
.
title
=
"天师下山各显神勇"
+
i
bean
.
imageRes
=
imageUrls
.
get
(
i
)
bannerList
.
add
(
bean
)
}
banner
.
addBannerLifecycleObserver
(
this
)
.
setAdapter
(
ImageTitleAdapter
(
bannerList
))
.
setOnBannerListener
{
data
,
position
->
showToast
(
position
.
toString
())
}
}
private
fun
initListener
()
{
srlMainPage
.
setOnRefreshListener
(
this
)
iv_main_watching_close
.
setOnClickListener
(
this
)
...
...
@@ -121,9 +97,6 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
if
(
AntiShake
.
check
(
v
?.
id
))
return
when
(
v
?.
id
)
{
// R.id.tv_test -> {
// readyGo(VideoActivity::class.java)
// }
R
.
id
.
iv_main_watching_close
->
{
LocalVedioManager
.
closeCacheVedio
()
ll_main_watching_root
.
visibility
=
View
.
GONE
...
...
@@ -131,7 +104,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
R
.
id
.
tv_main_watching_goto
->
{
val
cacheVedio
=
LocalVedioManager
.
getCacheVedio
()
if
(
cacheVedio
!=
null
)
{
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
null
)
}
}
}
...
...
@@ -148,20 +121,22 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
homePresenter
.
userLogin
()
}
else
{
homePresenter
.
getHomeV1Types
()
homePresenter
.
topTabs
()
homePresenter
.
orders
()
}
}
}
}
private
fun
initVp
()
{
topAdapter
=
TopAdapter
(
null
)
topAdapter
=
TopAdapter
(
topList
)
val
ma
=
LinearLayoutManager
(
requireContext
())
ma
.
orientation
=
LinearLayoutManager
.
HORIZONTAL
rv_main_list
.
layoutManager
=
ma
rv_main_list
.
adapter
=
topAdapter
topAdapter
?.
setOnItemClickListener
(
object
:
TopAdapter
.
OnItemClickListener
{
override
fun
onItemClick
(
position
:
Int
)
{
showToast
(
position
.
toString
()
)
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
null
)
}
})
...
...
@@ -172,7 +147,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
// 初始化Tab
tab
.
id
=
position
if
(
tabsData
.
size
>
0
)
{
tab
.
customView
=
getTabView
(
tabsData
[
position
].
t
itl
e
)
tab
.
customView
=
getTabView
(
tabsData
[
position
].
t
yp
e
)
}
}.
attach
()
tablayout
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
{
...
...
@@ -221,24 +196,24 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
fun
setWatchingStatus
()
{
if
(
LocalVedioManager
.
isCacheVedio
())
{
ll_main_watching_root
.
visibility
=
View
.
VISIBLE
val
cacheVedio
=
LocalVedioManager
.
getCacheVedio
()
if
(
cacheVedio
!=
null
)
{
//
if (LocalVedioManager.isCacheVedio()) {
ll_main_watching_root
.
visibility
=
View
.
VISIBLE
val
cacheVedio
=
LocalVedioManager
.
getCacheVedio
()
if
(
cacheVedio
!=
null
)
{
}
}
GlideUtils
.
loadImageViewGifForFitCenter
(
requireContext
(),
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg-bcurd/img/bg_vip_top1.png"
,
iv_main_watching_pic
)
GlideUtils
.
loadImageViewGifForFitCenter
(
requireContext
(),
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg-bcurd/img/bg_vip_top1.png"
,
iv_main_watching_pic
)
// tv_main_watching_name.text=""
// tv_main_watching_text1.text=""
// tv_main_watching_text2.text=""
}
else
{
ll_main_watching_root
.
visibility
=
View
.
GONE
}
//
} else {
//
ll_main_watching_root.visibility = View.GONE
//
}
}
override
fun
getHomeV1MsgSuc
(
data
:
HotStyleTypesListBean
)
{
...
...
@@ -249,4 +224,28 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
vpAdapter
?.
notifyDataSetChanged
()
}
}
override
fun
topTabsSuc
(
data
:
BannerList
)
{
if
(
data
!=
null
&&
data
.
list
!=
null
&&
data
.
list
.
size
>
0
)
{
bannerList
.
clear
()
for
(
i
in
0
until
data
.
list
.
size
)
{
val
bean
=
BannerBean
()
bean
.
title
=
data
.
list
.
get
(
i
).
title
bean
.
imageRes
=
data
.
list
.
get
(
i
).
coverImage
bannerList
.
add
(
bean
)
}
banner
.
addBannerLifecycleObserver
(
this
)
.
setAdapter
(
ImageTitleAdapter
(
bannerList
))
.
setOnBannerListener
{
data
,
position
->
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
null
)
}
}
}
override
fun
ordersSuc
(
data
:
BannerList
)
{
topList
.
clear
()
topList
.
addAll
(
data
.
list
)
topAdapter
?.
notifyDataSetChanged
()
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/MovieFragment.kt
View file @
3f929fbe
...
...
@@ -6,6 +6,7 @@ import androidx.fragment.app.Fragment
import
androidx.recyclerview.widget.GridLayoutManager
import
com.mints.wisdomclean.R
import
com.mints.wisdomclean.common.Constant
import
com.mints.wisdomclean.manager.LocalVedioManager
import
com.mints.wisdomclean.mvp.model.*
import
com.mints.wisdomclean.mvp.presenters.PicContentPresenter
import
com.mints.wisdomclean.mvp.views.PicContentView
...
...
@@ -123,7 +124,8 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
// if (hotList.size > 0) {
//
// }
showToast
(
position
.
toString
())
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
null
)
// showToast(position.toString())
}
})
}
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/MyFragment.kt
View file @
3f929fbe
...
...
@@ -74,7 +74,7 @@ class MyFragment : BaseFragment(), MyView, View.OnClickListener {
R
.
id
.
ll_my_setting
->
{
readyGo
(
SettingsActivity
::
class
.
java
)
}
R
.
id
.
tv_my_account
->
{
R
.
id
.
tv_my_account
,
R
.
id
.
ll_my_login
->
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
MobileLoginActivity
::
class
.
java
)
}
...
...
@@ -132,6 +132,7 @@ class MyFragment : BaseFragment(), MyView, View.OnClickListener {
}
private
fun
initListener
()
{
ll_my_login
.
setOnClickListener
(
this
)
tv_my_btn
.
setOnClickListener
(
this
)
tv_my_account
.
setOnClickListener
(
this
)
ll_my_record
.
setOnClickListener
(
this
)
...
...
video/app/src/main/res/layout/fragment_main.xml
View file @
3f929fbe
...
...
@@ -205,12 +205,11 @@
<ImageView
android:id=
"@+id/iv_main_watching_close"
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_marginTop=
"4dp"
android:layout_marginRight=
"4dp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"10dp"
android:layout_alignParentRight=
"true"
android:src=
"@mipmap/ic_
activity_quit
"
></ImageView>
android:src=
"@mipmap/ic_
quit_white
"
></ImageView>
<TextView
android:id=
"@+id/tv_main_watching_goto"
...
...
video/app/src/main/res/layout/fragment_main_my.xml
View file @
3f929fbe
...
...
@@ -31,6 +31,7 @@
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/ll_my_login"
android:layout_marginTop=
"56dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
video/app/src/main/res/mipmap-xhdpi/bg_vip_btn.png
View replaced file @
48c66288
View file @
3f929fbe
9.95 KB
|
W:
|
H:
15 KB
|
W:
|
H:
2-up
Swipe
Onion skin
video/app/src/main/res/mipmap-xhdpi/ic_quit_white.png
0 → 100644
View file @
3f929fbe
436 Bytes
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