use of net.youmi.android.normal.spot.SplashViewSettings in project remusic by aa112901.
the class SplashActivity method setupSplashAd.
/**
* 设置开屏广告
*/
private void setupSplashAd() {
// 创建开屏容器
final RelativeLayout splashLayout = (RelativeLayout) findViewById(R.id.rl_splash);
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
params.addRule(RelativeLayout.ABOVE, R.id.view_divider);
// 对开屏进行设置
SplashViewSettings splashViewSettings = new SplashViewSettings();
// // 设置是否展示失败自动跳转,默认自动跳转
// splashViewSettings.setAutoJumpToTargetWhenShowFailed(false);
// 设置跳转的窗口类
splashViewSettings.setTargetClass(MainActivity.class);
// 设置开屏的容器
splashViewSettings.setSplashViewContainer(splashLayout);
// 展示开屏广告
SpotManager.getInstance(mContext).showSplash(mContext, splashViewSettings, mStopListener);
}
Aggregations