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
a6ebd3d5
Commit
a6ebd3d5
authored
Jan 08, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
e2f9aea3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
UIUtils.java
...pp/src/main/java/com/duben/xixiplaylet/utils/UIUtils.java
+18
-4
NewTxVideoActivity.kt
...n/xixiplaylet/video/tx/newrecommend/NewTxVideoActivity.kt
+4
-2
No files found.
video/app/src/main/java/com/duben/xixiplaylet/utils/UIUtils.java
View file @
a6ebd3d5
...
...
@@ -12,6 +12,8 @@ import android.view.ViewGroup;
import
android.view.ViewParent
;
import
android.view.WindowManager
;
import
com.duben.xixiplaylet.MintsApplication
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.Method
;
...
...
@@ -22,13 +24,25 @@ import java.lang.reflect.Method;
public
class
UIUtils
{
public
static
int
getScreenWidth
(
Context
context
)
{
try
{
DisplayMetrics
dm
=
context
.
getResources
().
getDisplayMetrics
();
return
dm
.
widthPixels
;
}
catch
(
Exception
e
){
DisplayMetrics
dm
=
MintsApplication
.
getContext
().
getResources
().
getDisplayMetrics
();
return
dm
.
widthPixels
;
}
}
public
static
int
getScreenHeight
(
Context
context
)
{
try
{
DisplayMetrics
dm
=
context
.
getResources
().
getDisplayMetrics
();
return
dm
.
heightPixels
;
}
catch
(
Exception
e
){
DisplayMetrics
dm
=
MintsApplication
.
getContext
().
getResources
().
getDisplayMetrics
();
return
dm
.
heightPixels
;
}
}
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/tx/newrecommend/NewTxVideoActivity.kt
View file @
a6ebd3d5
...
...
@@ -54,6 +54,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
private
var
orderTagsList
:
ArrayList
<
String
>?
=
null
private
var
playIndex
=
1
private
var
vedioAdPosition
=
0
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_new_tx_video
...
...
@@ -287,6 +288,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
override
fun
onCustomChildClick
(
view
:
View
,
position
:
Int
)
{
vedioAdPosition
=
position
when
(
view
.
id
)
{
R
.
id
.
ll_collect
->
{
// 无收藏
...
...
@@ -336,13 +338,13 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
override
fun
adClose
(
vo
:
HashMap
<
String
,
Any
>?)
{
updateEpisodeData
(
p
osition
,
vo
)
updateEpisodeData
(
vedioAdP
osition
,
vo
)
}
})
}
override
fun
adClose
(
vo
:
HashMap
<
String
,
Any
>?)
{
updateEpisodeData
(
p
osition
,
vo
)
updateEpisodeData
(
vedioAdP
osition
,
vo
)
}
})
}
...
...
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