本文整理汇总了Java中com.youdo.ad.interfaces.IAdContants类的典型用法代码示例。如果您正苦于以下问题:Java IAdContants类的具体用法?Java IAdContants怎么用?Java IAdContants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IAdContants类属于com.youdo.ad.interfaces包,在下文中一共展示了IAdContants类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import com.youdo.ad.interfaces.IAdContants; //导入依赖的package包/类
@Override
public void run(IXYDEvent arg0) {
String type = arg0.getType();
if (type.equals(AdApplicationContext.AD_PREPARED)) {
if (isInteractiveAdShow) {
DisposableStatsUtils.disposeSHU(getAdvInfo());
}
} else if (type.equals(AdApplicationContext.AD_STOPED)) {
isInteractiveAdShow = false;
isInteractiveAdHide = false;
mAdApplicationContext.removeAllListeners();
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
mInteractiveAdContainer.removeAllViews();
mInteractiveAdContainer.setVisibility(View.GONE);
mInteractiveAdGoFull.setVisibility(View.GONE);
if (mAdPageHolder != null) {
mAdPageHolder.setVisibility(View.VISIBLE);
}
}
});
if ((mediaPlayerDelegate.videoInfo != null && !StaticsUtil.PLAY_TYPE_LOCAL
.equals(mediaPlayerDelegate.videoInfo.getPlayType()))) {
mActivity.setOrientionEnable();
}
if (mMediaPlayerDelegate != null
&& mMediaPlayerDelegate.mediaPlayer != null
&& mediaPlayerDelegate.videoInfo.getCurrentAdvInfo() != null
&& mInteractiveAdVideoRs
.equalsIgnoreCase(mediaPlayerDelegate.videoInfo
.getCurrentAdvInfo().RS)) {
mediaPlayerDelegate.videoInfo.removePlayedAdv();
mMediaPlayerDelegate.mediaPlayer.skipCurPreAd();
}
} else if (type.equals(AdApplicationContext.AD_ERROR)) {
Logger.e("PlayFlow", "PlugiADPlay: interactive ad error");
closeInteractiveAd();
} else if (type.equals(AdApplicationContext.AD_VIEW_MODE_CHANGE)) {
String oldViewMode = (String) arg0.getData().get("oldViewMode");
String newViewMode = (String) arg0.getData().get("newViewMode");
if (IAdContants.ViewMode.EXPAND.getValue().equals(oldViewMode)
&& IAdContants.ViewMode.THUMBNAIL.getValue().equals(
newViewMode)) {
isInteractiveAdHide = true;
mAdApplicationContext.hide();
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
mInteractiveAdContainer.setVisibility(View.GONE);
if (mAdPageHolder != null) {
mAdPageHolder.setVisibility(View.VISIBLE);
}
mInteractiveAdGoFull.setVisibility(View.VISIBLE);
}
});
if ((mediaPlayerDelegate.videoInfo != null && !StaticsUtil.PLAY_TYPE_LOCAL
.equals(mediaPlayerDelegate.videoInfo.getPlayType()))) {
mActivity.setOrientionEnable();
}
}
if (IAdContants.ViewMode.EXPAND.getValue().equals(newViewMode)) {
isInteractiveAdHide = false;
}
} else if (type.equals(IAdApplicationContext.VIDEO_PAUSE)) {
if (mMediaPlayerDelegate != null) {
mMediaPlayerDelegate.pauseByInteractiveAd();
}
} else if (type.equals(IAdApplicationContext.VIDEO_RESUME)) {
if (mMediaPlayerDelegate != null) {
mMediaPlayerDelegate.startByInteractiveAd();
}
}
}