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
284aa6af
Commit
284aa6af
authored
May 22, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
d68c6994
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
33 deletions
+30
-33
HomePresenter.kt
...java/com/duben/microtribe/mvp/presenters/HomePresenter.kt
+1
-1
MyPresenter.kt
...n/java/com/duben/microtribe/mvp/presenters/MyPresenter.kt
+1
-1
NineActivity.kt
...in/java/com/duben/microtribe/ui/activitys/NineActivity.kt
+2
-2
MovieFragment.kt
...in/java/com/duben/microtribe/ui/fragment/MovieFragment.kt
+16
-14
MyFragment.kt
.../main/java/com/duben/microtribe/ui/fragment/MyFragment.kt
+2
-2
UIUtils.java
...app/src/main/java/com/duben/microtribe/utils/UIUtils.java
+5
-10
DramaApiDetailActivity.kt
.../com/duben/microtribe/video/csj/DramaApiDetailActivity.kt
+1
-1
TxVideoActivity.kt
...ain/java/com/duben/microtribe/video/tx/TxVideoActivity.kt
+1
-1
NewTxVideoActivity.kt
...en/microtribe/video/tx/newrecommend/NewTxVideoActivity.kt
+1
-1
No files found.
video/app/src/main/java/com/duben/microtribe/mvp/presenters/HomePresenter.kt
View file @
284aa6af
...
...
@@ -67,7 +67,7 @@ class HomePresenter : BasePresenter<HomeView>() {
when
(
code
)
{
200
->
{
view
.
topTabsSuc
(
baseResponse
.
data
)
showTurn
()
//
showTurn()
}
else
->
{
view
.
showToast
(
message
)
...
...
video/app/src/main/java/com/duben/microtribe/mvp/presenters/MyPresenter.kt
View file @
284aa6af
...
...
@@ -82,7 +82,7 @@ class MyPresenter : BasePresenter<MyView>() {
val
code
=
baseResponse
.
status
when
(
code
)
{
200
->
{
showTurn
()
//
showTurn()
getMyInfo
()
}
}
...
...
video/app/src/main/java/com/duben/microtribe/ui/activitys/NineActivity.kt
View file @
284aa6af
...
...
@@ -73,7 +73,7 @@ class NineActivity : BaseActivity(), View.OnClickListener, NineView {
override
fun
onResume
()
{
super
.
onResume
()
ninePresenter
.
showTurn
()
//
ninePresenter.showTurn()
}
override
fun
onDestroy
()
{
...
...
@@ -127,7 +127,7 @@ class NineActivity : BaseActivity(), View.OnClickListener, NineView {
}
override
fun
unlockSuc
()
{
ninePresenter
.
showTurn
()
//
ninePresenter.showTurn()
if
(
isAdShow
)
{
if
(
nineShowBean
!=
null
)
{
...
...
video/app/src/main/java/com/duben/microtribe/ui/fragment/MovieFragment.kt
View file @
284aa6af
...
...
@@ -121,14 +121,14 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
hotStyleAdapter
.
animationEnable
=
false
rv_pic_list
.
adapter
=
hotStyleAdapter
val
emptyView
=
LayoutInflater
.
from
(
requireContext
()).
inflate
(
R
.
layout
.
item_empty_data
,
null
)
LayoutInflater
.
from
(
requireContext
()).
inflate
(
R
.
layout
.
item_empty_data
,
null
)
hotStyleAdapter
.
setEmptyView
(
emptyView
)
hotStyleAdapter
.
setOnCustomChildClickListener
(
object
:
NewHotStyleAdapter
.
OnCustomChildClickListener
{
NewHotStyleAdapter
.
OnCustomChildClickListener
{
override
fun
onCustomChildClick
(
view
:
View
,
vedioBean
:
VedioBean
)
{
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
vedioBean
requireActivity
(),
vedioBean
)
}
})
...
...
@@ -169,19 +169,21 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
var
insertIndex
=
3
val
allData
=
hotStyleAdapter
.
data
for
(
i
in
allData
.
size
-
1
downTo
0
)
{
if
(
allData
[
i
].
itemType
==
MULTI_ITEM_3
)
{
insertIndex
+=
4
if
(
allData
!=
null
&&
allData
.
size
>
0
)
{
for
(
i
in
allData
.
size
-
1
downTo
0
)
{
if
(
allData
[
i
].
itemType
==
MULTI_ITEM_3
)
{
insertIndex
+=
4
}
}
if
(
insertIndex
>=
allData
.
size
)
{
insertIndex
=
allData
.
size
}
}
if
(
insertIndex
>=
allData
.
size
)
{
insertIndex
=
allData
.
size
}
if
(
allData
[
allData
.
lastIndex
].
itemType
==
MULTI_ITEM_3
)
return
if
(
allData
[
allData
.
lastIndex
].
itemType
==
MULTI_ITEM_3
)
return
val
data
=
VideoMultiItemEntity3
(
MULTI_ITEM_3
,
null
,
adView
)
hotStyleAdapter
.
addData
(
insertIndex
,
data
)
val
data
=
VideoMultiItemEntity3
(
MULTI_ITEM_3
,
null
,
adView
)
hotStyleAdapter
.
addData
(
insertIndex
,
data
)
}
}
override
fun
onDestroyView
()
{
...
...
video/app/src/main/java/com/duben/microtribe/ui/fragment/MyFragment.kt
View file @
284aa6af
...
...
@@ -100,7 +100,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
}
if
(!
TextUtils
.
isEmpty
(
userManager
?.
userID
))
{
myPresenter
.
showTurn
()
//
myPresenter.showTurn()
myPresenter
.
getMyInfo
()
}
else
{
myPresenter
.
userLogin
()
...
...
@@ -209,7 +209,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
//----9宫格逻辑--开始--//
override
fun
unlockSuc
()
{
myPresenter
.
showTurn
()
//
myPresenter.showTurn()
if
(
nineShowBean
!=
null
)
{
if
(
nineShowBean
!!
.
need
-
nineShowBean
!!
.
complete
-
1
>
0
)
{
...
...
video/app/src/main/java/com/duben/microtribe/utils/UIUtils.java
View file @
284aa6af
...
...
@@ -28,8 +28,7 @@ public class UIUtils {
DisplayMetrics
dm
=
context
.
getResources
().
getDisplayMetrics
();
return
dm
.
widthPixels
;
}
catch
(
Exception
e
){
DisplayMetrics
dm
=
ForegroundOrBackground
.
getTopActivity
().
getResources
().
getDisplayMetrics
();
return
dm
.
widthPixels
;
return
0
;
}
}
...
...
@@ -39,8 +38,7 @@ public class UIUtils {
DisplayMetrics
dm
=
context
.
getResources
().
getDisplayMetrics
();
return
dm
.
heightPixels
;
}
catch
(
Exception
e
){
DisplayMetrics
dm
=
ForegroundOrBackground
.
getTopActivity
().
getResources
().
getDisplayMetrics
();
return
dm
.
heightPixels
;
return
0
;
}
}
...
...
@@ -60,8 +58,7 @@ public class UIUtils {
final
float
scale
=
context
.
getResources
().
getDisplayMetrics
().
density
;
return
(
int
)
(
dpValue
*
scale
+
0.5f
);
}
catch
(
Exception
e
){
final
float
scale
=
ForegroundOrBackground
.
getTopActivity
().
getResources
().
getDisplayMetrics
().
density
;
return
(
int
)
(
dpValue
*
scale
+
0.5f
);
return
0
;
}
}
...
...
@@ -293,8 +290,7 @@ public class UIUtils {
final
float
scale
=
context
.
getResources
().
getDisplayMetrics
().
density
;
return
(
int
)
(
pxValue
/
(
scale
<=
0
?
1
:
scale
)
+
0.5f
);
}
catch
(
Exception
e
){
final
float
scale
=
ForegroundOrBackground
.
getTopActivity
().
getResources
().
getDisplayMetrics
().
density
;
return
(
int
)
(
pxValue
/
(
scale
<=
0
?
1
:
scale
)
+
0.5f
);
return
0
;
}
}
...
...
@@ -304,8 +300,7 @@ public class UIUtils {
final
float
scale
=
context
.
getResources
().
getDisplayMetrics
().
density
;
return
(
int
)
(
dp
*
scale
+
0.5f
);
}
catch
(
Exception
e
){
final
float
scale
=
ForegroundOrBackground
.
getTopActivity
().
getResources
().
getDisplayMetrics
().
density
;
return
(
int
)
(
dp
*
scale
+
0.5f
);
return
0
;
}
}
...
...
video/app/src/main/java/com/duben/microtribe/video/csj/DramaApiDetailActivity.kt
View file @
284aa6af
...
...
@@ -268,7 +268,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
override
fun
onResume
()
{
super
.
onResume
()
videoPresenter
.
showTurn
()
//
videoPresenter.showTurn()
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
// 重置状态
...
...
video/app/src/main/java/com/duben/microtribe/video/tx/TxVideoActivity.kt
View file @
284aa6af
...
...
@@ -82,7 +82,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
override
fun
onResume
()
{
super
.
onResume
()
super_short_video_view
.
resume
()
videoPresenter
.
showTurn
()
//
videoPresenter.showTurn()
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
// 重置状态
...
...
video/app/src/main/java/com/duben/microtribe/video/tx/newrecommend/NewTxVideoActivity.kt
View file @
284aa6af
...
...
@@ -79,7 +79,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
super
.
onResume
()
new_super_short_video_view
.
resume
()
videoPresenter
.
showTurn
()
//
videoPresenter.showTurn()
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
// 重置状态
...
...
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