Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
zxhc
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
zxhc
Commits
ecc88b83
Commit
ecc88b83
authored
Jul 15, 2021
by
zxhljwl
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.huolea.com:wangxuewei/zxhc
parents
8ea2a89a
6b344ded
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
22 deletions
+53
-22
MainActivity.java
app/src/main/java/com/ym/zxhcsdkaar/MainActivity.java
+7
-7
RewardVideoPortraitADActivity.java
...ava/com/ym/zxhcsdk/ads/RewardVideoPortraitADActivity.java
+29
-4
activity_rewardvideo_portrait_a_d.xml
...src/main/res/layout/activity_rewardvideo_portrait_a_d.xml
+17
-11
video_sound_close.png
zxhcsdk/src/main/res/mipmap-xhdpi/video_sound_close.png
+0
-0
video_sound_open.png
zxhcsdk/src/main/res/mipmap-xhdpi/video_sound_open.png
+0
-0
No files found.
app/src/main/java/com/ym/zxhcsdkaar/MainActivity.java
View file @
ecc88b83
...
@@ -194,39 +194,39 @@ public class MainActivity extends Activity {
...
@@ -194,39 +194,39 @@ public class MainActivity extends Activity {
zxhcRewardVideoAD
.
showRewardAD
(
MainActivity
.
this
,
new
RewardVideoAdShowListener
()
{
zxhcRewardVideoAD
.
showRewardAD
(
MainActivity
.
this
,
new
RewardVideoAdShowListener
()
{
@Override
@Override
public
void
OnAdShow
()
{
public
void
OnAdShow
()
{
Log
.
d
(
"wxw"
,
"RewardVideoAd OnAdShow"
);
}
}
@Override
@Override
public
void
OnRewardVerify
()
{
public
void
OnRewardVerify
()
{
Log
.
d
(
"wxw"
,
"RewardVideoAd OnRewardVerify"
);
}
}
@Override
@Override
public
void
OnAdClicked
()
{
public
void
OnAdClicked
()
{
Log
.
d
(
"wxw"
,
"RewardVideoAd OnAdClicked"
);
}
}
@Override
@Override
public
void
OnVideoCompleted
()
{
public
void
OnVideoCompleted
()
{
Log
.
d
(
"wxw"
,
"RewardVideoAd OnVideoCompleted"
);
}
}
@Override
@Override
public
void
OnAdClosed
()
{
public
void
OnAdClosed
()
{
Log
.
d
(
"wxw"
,
"RewardVideoAd OnAdClosed"
);
}
}
@Override
@Override
public
void
OnVideoError
(
String
error
)
{
public
void
OnVideoError
(
String
error
)
{
Log
.
d
(
"wxw"
,
"RewardVideoAd OnVideoError"
+
error
);
}
}
});
});
}
}
@Override
@Override
public
void
OnLoadError
(
String
error
)
{
public
void
OnLoadError
(
String
error
)
{
Log
.
d
(
"wxw"
,
"RewardVideoAd LoadError"
+
error
);
}
}
});
});
}
}
...
...
zxhcsdk/src/main/java/com/ym/zxhcsdk/ads/RewardVideoPortraitADActivity.java
View file @
ecc88b83
...
@@ -104,6 +104,11 @@ public class RewardVideoPortraitADActivity extends Activity implements SurfaceHo
...
@@ -104,6 +104,11 @@ public class RewardVideoPortraitADActivity extends Activity implements SurfaceHo
RewardVideoAdClick
();
RewardVideoAdClick
();
}
}
});
});
//初始化SurfaceHolder类,SurfaceView的控制器
//初始化SurfaceHolder类,SurfaceView的控制器
surfaceHolder
=
sfv_reward_show
.
getHolder
();
surfaceHolder
=
sfv_reward_show
.
getHolder
();
surfaceHolder
.
addCallback
(
this
);
surfaceHolder
.
addCallback
(
this
);
...
@@ -142,10 +147,6 @@ public class RewardVideoPortraitADActivity extends Activity implements SurfaceHo
...
@@ -142,10 +147,6 @@ public class RewardVideoPortraitADActivity extends Activity implements SurfaceHo
}
}
};
};
//TODO 点击按钮,跳转的落地页, 或者是软件下载地
//址。(可通过 target_type 字段判断是到普通
//落地页还是下载 app,唤醒则通过 deeplink 是
//否为空判断) 确认video_endbutoonurl 具体含义 以及跳转Web的路径
private
void
RewardVideoAdClick
()
{
private
void
RewardVideoAdClick
()
{
boolean
IsSuccess
=
true
;
boolean
IsSuccess
=
true
;
if
(
TextUtils
.
isEmpty
(
RewardVideoMediaPlayer
.
getInstance
().
getHcAdBean
().
getDeeplink
()))
{
if
(
TextUtils
.
isEmpty
(
RewardVideoMediaPlayer
.
getInstance
().
getHcAdBean
().
getDeeplink
()))
{
...
@@ -232,6 +233,30 @@ public class RewardVideoPortraitADActivity extends Activity implements SurfaceHo
...
@@ -232,6 +233,30 @@ public class RewardVideoPortraitADActivity extends Activity implements SurfaceHo
private
void
SetAdVideo
(){
private
void
SetAdVideo
(){
TopClose
.
setVisibility
(
View
.
GONE
);
TopClose
.
setVisibility
(
View
.
GONE
);
TopTimeTv
.
setVisibility
(
View
.
VISIBLE
);
TopTimeTv
.
setVisibility
(
View
.
VISIBLE
);
//设置声音按钮
ImageView
soundImgOpen
=
findViewById
(
R
.
id
.
reward_ad_sound_open
);
ImageView
soundImgClose
=
findViewById
(
R
.
id
.
reward_ad_sound_close
);
soundImgOpen
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
soundImgOpen
.
setVisibility
(
View
.
GONE
);
soundImgClose
.
setVisibility
(
View
.
VISIBLE
);
RewardVideoMediaPlayer
.
getInstance
().
getMediaPlayer
().
setVolume
(
0
,
0
);
}
});
soundImgClose
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
soundImgClose
.
setVisibility
(
View
.
GONE
);
soundImgOpen
.
setVisibility
(
View
.
VISIBLE
);
RewardVideoMediaPlayer
.
getInstance
().
getMediaPlayer
().
setVolume
(
1
,
1
);
}
});
}
}
@Override
@Override
...
...
zxhcsdk/src/main/res/layout/activity_rewardvideo_portrait_a_d.xml
View file @
ecc88b83
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<FrameLayout
<FrameLayout
android:id=
"@+id/frame_content"
android:id=
"@+id/frame_content"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -16,22 +17,29 @@
...
@@ -16,22 +17,29 @@
android:id=
"@+id/id_iv_preview"
android:id=
"@+id/id_iv_preview"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"fitXY"
/>
android:scaleType=
"fitXY"
/>
</FrameLayout>
</FrameLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"60dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/reward_ad_sound_open"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"20dp"
android:src=
"@mipmap/video_sound_open"
/>
<ImageView
<ImageView
android:id=
"@+id/reward_ad_
Voic
e"
android:id=
"@+id/reward_ad_
sound_clos
e"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"20dp"
android:layout_marginLeft=
"20dp"
android:
layout_marginTop=
"20dp
"
android:
src=
"@mipmap/video_sound_close
"
android:
src=
"@mipmap/arrow_left
"
/>
android:
visibility=
"gone
"
/>
<View
<View
android:layout_width=
"0dp"
android:layout_width=
"0dp"
...
@@ -42,7 +50,6 @@
...
@@ -42,7 +50,6 @@
android:id=
"@+id/reward_ad_time"
android:id=
"@+id/reward_ad_time"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginRight=
"20dp"
android:textColor=
"#FFFFFF"
android:textColor=
"#FFFFFF"
android:textSize=
"20dp"
android:textSize=
"20dp"
...
@@ -52,7 +59,6 @@
...
@@ -52,7 +59,6 @@
android:id=
"@+id/reward_ad_close"
android:id=
"@+id/reward_ad_close"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginRight=
"20dp"
android:src=
"@mipmap/feedad_close"
/>
android:src=
"@mipmap/feedad_close"
/>
...
@@ -72,8 +78,8 @@
...
@@ -72,8 +78,8 @@
android:id=
"@+id/reward_ad_app_icon"
android:id=
"@+id/reward_ad_app_icon"
android:layout_width=
"70dp"
android:layout_width=
"70dp"
android:layout_height=
"70dp"
android:layout_height=
"70dp"
android:
scaleType=
"fitCenter
"
android:
layout_marginLeft=
"10dp
"
android:
layout_marginLeft=
"10dp
"
/>
android:
scaleType=
"fitCenter
"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/reward_ad_desc_view"
android:id=
"@+id/reward_ad_desc_view"
...
@@ -112,9 +118,9 @@
...
@@ -112,9 +118,9 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:layout_marginRight=
"10dp"
android:background=
"@drawable/btn_bg"
android:textColor=
"#000000"
android:textColor=
"#000000"
android:textSize=
"16sp"
android:textSize=
"16sp"
/>
android:background=
"@drawable/btn_bg"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
zxhcsdk/src/main/res/mipmap-xhdpi/video_sound_close.png
0 → 100644
View file @
ecc88b83
10.6 KB
zxhcsdk/src/main/res/mipmap-xhdpi/video_sound_open.png
0 → 100644
View file @
ecc88b83
12.1 KB
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