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
97c6170a
Commit
97c6170a
authored
Jul 25, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Plain Diff
代码优化
parents
9caf7f1c
9867c328
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
180 additions
and
181 deletions
+180
-181
misc.xml
video/.idea/misc.xml
+4
-0
Constant.kt
.../app/src/main/java/com/xinfu/helivideo/common/Constant.kt
+0
-5
DramaApiDetailActivity.kt
.../java/com/xinfu/helivideo/video/DramaApiDetailActivity.kt
+139
-134
TxVideoActivity.kt
...rc/main/java/com/xinfu/helivideo/video/TxVideoActivity.kt
+37
-42
No files found.
video/.idea/misc.xml
View file @
97c6170a
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"ExternalStorageConfigurationManager"
enabled=
"true"
/>
<component
name=
"ExternalStorageConfigurationManager"
enabled=
"true"
/>
<<<<<<
< HEAD
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_11"
default=
"true"
project-jdk-name=
"jbr-17"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_11"
default=
"true"
project-jdk-name=
"jbr-17"
project-jdk-type=
"JavaSDK"
>
=======
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_11"
project-jdk-name=
"11"
project-jdk-type=
"JavaSDK"
>
>>>>>>> 9867c328a2debc3a54d3299285d9192ec520c649
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
</component>
<component
name=
"ProjectType"
>
<component
name=
"ProjectType"
>
...
...
video/app/src/main/java/com/xinfu/helivideo/common/Constant.kt
View file @
97c6170a
...
@@ -35,11 +35,6 @@ object Constant {
...
@@ -35,11 +35,6 @@ object Constant {
const
val
FRAGMENT_CLICK_TWO
=
1
const
val
FRAGMENT_CLICK_TWO
=
1
const
val
FRAGMENT_CLICK_THREE
=
2
const
val
FRAGMENT_CLICK_THREE
=
2
const
val
VIP_REQUEST_CODE
=
0
x111
// 协议地址
// 协议地址
var
REGISTER_URL
=
"http://mints-web.mints-id.com/agreements/helivideo/yhxy.html"
//注册协议
var
REGISTER_URL
=
"http://mints-web.mints-id.com/agreements/helivideo/yhxy.html"
//注册协议
var
PRIVACY_URL
=
"http://mints-web.mints-id.com/agreements/helivideo/syzc.html"
//隐私协议
var
PRIVACY_URL
=
"http://mints-web.mints-id.com/agreements/helivideo/syzc.html"
//隐私协议
...
...
video/app/src/main/java/com/xinfu/helivideo/video/DramaApiDetailActivity.kt
View file @
97c6170a
package
com.xinfu.helivideo.video
package
com.xinfu.helivideo.video
import
android.app.Dialog
import
android.app.Dialog
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.util.Log
import
android.util.Log
import
android.view.KeyEvent
import
android.view.View
import
android.view.View
import
android.widget.Button
import
android.widget.Button
import
android.widget.ImageView
import
android.widget.ImageView
...
@@ -53,6 +51,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -53,6 +51,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
private
val
videoPresenter
by
lazy
{
VideoPresenter
()
}
private
val
videoPresenter
by
lazy
{
VideoPresenter
()
}
private
var
mVipFlag
=
UserManager
.
getInstance
().
vipFlag
private
var
dpWidget
:
IDPWidget
?
=
null
private
var
dpWidget
:
IDPWidget
?
=
null
private
var
isInited
=
false
private
var
isInited
=
false
private
var
drama
:
DPDrama
?
=
null
private
var
drama
:
DPDrama
?
=
null
...
@@ -192,7 +192,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -192,7 +192,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
VipActivity
.
VEDIO_ID
,
mVedioBean
!!
.
vedioId
.
toString
())
bundle
.
putString
(
VipActivity
.
VEDIO_ID
,
mVedioBean
!!
.
vedioId
.
toString
())
bundle
.
putString
(
VipActivity
.
THIRD_ID
,
mVedioBean
!!
.
thirdId
)
bundle
.
putString
(
VipActivity
.
THIRD_ID
,
mVedioBean
!!
.
thirdId
)
readyGo
ForResult
(
VipActivity
::
class
.
java
,
Constant
.
VIP_REQUEST_CODE
,
bundle
)
readyGo
(
VipActivity
::
class
.
java
,
bundle
)
}
}
}
}
...
@@ -228,6 +228,14 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -228,6 +228,14 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
super
.
onDestroy
()
super
.
onDestroy
()
}
}
override
fun
onResume
()
{
super
.
onResume
()
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
// 重置状态
resetData
()
}
}
override
fun
onPause
()
{
override
fun
onPause
()
{
super
.
onPause
()
super
.
onPause
()
}
}
...
@@ -655,9 +663,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -655,9 +663,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
view
.
setImageDrawable
(
lottieDrawable
)
view
.
setImageDrawable
(
lottieDrawable
)
}
}
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
?)
{
private
fun
resetData
()
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
)
if
(
requestCode
==
Constant
.
VIP_REQUEST_CODE
)
{
if
(
UserManager
.
getInstance
().
vipFlag
)
{
if
(
UserManager
.
getInstance
().
vipFlag
)
{
mVedioBean
?.
let
{
mVedioBean
?.
let
{
...
@@ -697,7 +703,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -697,7 +703,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
}
}
}
}
}
}
}
}
}
}
}
\ No newline at end of file
video/app/src/main/java/com/xinfu/helivideo/video/TxVideoActivity.kt
View file @
97c6170a
package
com.xinfu.helivideo.video
package
com.xinfu.helivideo.video
import
android.app.Dialog
import
android.app.Dialog
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.os.Handler
import
android.os.Handler
import
android.os.Looper
import
android.os.Looper
...
@@ -35,6 +34,8 @@ import kotlinx.android.synthetic.main.activity_tx_video.*
...
@@ -35,6 +34,8 @@ import kotlinx.android.synthetic.main.activity_tx_video.*
class
TxVideoActivity
:
BaseActivity
(),
View
.
OnClickListener
,
VideoView
,
class
TxVideoActivity
:
BaseActivity
(),
View
.
OnClickListener
,
VideoView
,
VideoEpisodeAdapter
.
OnEpisodeClickListener
,
TxVideoAdapter
.
OnCustomChildClickListener
{
VideoEpisodeAdapter
.
OnEpisodeClickListener
,
TxVideoAdapter
.
OnCustomChildClickListener
{
private
var
mVipFlag
=
UserManager
.
getInstance
().
vipFlag
var
videos
=
ArrayList
<
VedioEpisodeBean
>()
var
videos
=
ArrayList
<
VedioEpisodeBean
>()
private
var
dialog
:
VideoEpisodeDialog
?
=
null
private
var
dialog
:
VideoEpisodeDialog
?
=
null
...
@@ -75,6 +76,13 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -75,6 +76,13 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
super_short_video_view
.
resume
()
super_short_video_view
.
resume
()
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
// 重置状态
isPlayNext
=
false
playIndex
=
super_short_video_view
.
currentPosition
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
}
}
}
override
fun
onPause
()
{
override
fun
onPause
()
{
...
@@ -285,7 +293,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -285,7 +293,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
VipActivity
.
VEDIO_ID
,
mVedioBean
!!
.
vedioId
.
toString
())
bundle
.
putString
(
VipActivity
.
VEDIO_ID
,
mVedioBean
!!
.
vedioId
.
toString
())
bundle
.
putString
(
VipActivity
.
THIRD_ID
,
mVedioBean
!!
.
thirdId
)
bundle
.
putString
(
VipActivity
.
THIRD_ID
,
mVedioBean
!!
.
thirdId
)
readyGo
ForResult
(
VipActivity
::
class
.
java
,
Constant
.
VIP_REQUEST_CODE
,
bundle
)
readyGo
(
VipActivity
::
class
.
java
,
bundle
)
}
}
else
->
{}
else
->
{}
...
@@ -308,17 +316,4 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -308,17 +316,4 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
}
private
fun
getPosition
()
=
super_short_video_view
.
currentPosition
private
fun
getPosition
()
=
super_short_video_view
.
currentPosition
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
?)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
)
if
(
requestCode
==
Constant
.
VIP_REQUEST_CODE
)
{
if
(
UserManager
.
getInstance
().
vipFlag
)
{
// 重置状态
isPlayNext
=
false
playIndex
=
super_short_video_view
.
currentPosition
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
}
}
}
}
}
\ No newline at end of file
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