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
fafef763
Commit
fafef763
authored
Nov 22, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
e88a575e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
SuperShortVideoView.java
.../java/com/duben/heliapp/video/tx/SuperShortVideoView.java
+7
-6
TxVideoActivity.kt
...c/main/java/com/duben/heliapp/video/tx/TxVideoActivity.kt
+9
-3
No files found.
video/app/src/main/java/com/duben/heliapp/video/tx/SuperShortVideoView.java
View file @
fafef763
...
...
@@ -120,11 +120,11 @@ public class SuperShortVideoView extends RelativeLayout {
Log
.
i
(
TAG
,
"[SCROLL_STATE_IDLE] mLastPositionInIDLE "
+
mLastPositionInIDLE
+
" position "
+
position
);
mCurrentPosition
=
position
;
addAdView
(
position
);
//
addAdView(position);
onPageSelectedMethod
(
position
);
if
(
isLuckPosition
(
position
))
{
mAdapter
.
notifyItemChanged
(
position
);
recyclerView
.
post
(()
->
mAdapter
.
notifyItemChanged
(
position
)
);
}
break
;
case
RecyclerView
.
SCROLL_STATE_DRAGGING
:
//拖动
...
...
@@ -237,7 +237,8 @@ public class SuperShortVideoView extends RelativeLayout {
Log
.
i
(
TAG
,
"onItemClick"
);
mCurrentPosition
=
position
;
addAdView
(
mCurrentPosition
);
// addAdView(mCurrentPosition);
if
(
position
==
mList
.
size
()
-
1
)
return
;
onPageSelectedMethod
(
position
);
});
}
...
...
@@ -262,9 +263,9 @@ public class SuperShortVideoView extends RelativeLayout {
public
int
getRealSeeIndex
()
{
if
(
mList
!=
null
&&
mList
.
size
()
>
0
)
{
VideoMultiItemEntity
videoMultiItemEntity
=
mList
.
get
(
mCurrentPosition
);
if
(
videoMultiItemEntity
.
getItemType
()
==
MULTI_ITEM_1
)
{
return
videoMultiItemEntity
.
getVideo
().
getVedioIndex
()
-
1
;
}
//
if (videoMultiItemEntity.getItemType() == MULTI_ITEM_1) {
return
videoMultiItemEntity
.
getVideo
().
getVedioIndex
()
-
1
;
//
}
}
return
mCurrentPosition
;
}
...
...
video/app/src/main/java/com/duben/heliapp/video/tx/TxVideoActivity.kt
View file @
fafef763
...
...
@@ -22,6 +22,7 @@ import com.duben.heliapp.ui.widgets.DialogListener
import
com.duben.heliapp.ui.widgets.VideoEpisodeDialog
import
com.duben.heliapp.ui.widgets.VipDialog
import
com.duben.heliapp.utils.AppPreferencesManager
import
com.duben.heliapp.utils.LogUtil
import
com.duben.heliapp.utils.SpanUtils
import
com.duben.heliapp.video.tx.adapter.TxVideoAdapter
import
com.duben.library.utils.nodoubleclick.AntiShake
...
...
@@ -116,6 +117,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
// ll_lucky.visibility = View.GONE
super_short_video_view
.
pause
()
autoLock
()
LogUtil
.
d
(
"AAAAAAAAAAA setOnPageChangeListener"
)
return
@setOnPageChangeListener
}
...
...
@@ -258,8 +260,9 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
override
fun
onEpisodeClick
(
position
:
Int
)
{
dialog
?.
dismiss
()
val
readPosition
=
getRealPosition
(
position
+
1
)
super_short_video_view
.
onItemClick
(
readPosition
)
LogUtil
.
d
(
"BBBBBBBBB"
)
// val readPosition = getRealPosition(position)
super_short_video_view
.
onItemClick
(
position
)
}
private
fun
getAdapterData
():
MutableList
<
VideoMultiItemEntity
>
{
...
...
@@ -297,6 +300,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
R
.
id
.
unlock
,
R
.
id
.
block_view
->
{
autoLock
()
LogUtil
.
d
(
"AAAAAAAAAAA block_view"
)
// // 看广告解锁
// val carrierType = Constant.CARRIERTYPE_TX_VEDIO
...
...
@@ -377,8 +381,10 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
if
(
TextUtils
.
equals
(
vipType
,
"vip"
))
{
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
}
else
if
(
TextUtils
.
equals
(
vipType
,
"point"
))
{
LogUtil
.
d
(
"AAAAAAAAAAA vipType"
)
autoLock
()
}
else
{
}
else
{
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
}
}
...
...
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