1.开机取消10定时直接显示默认图,后续网络或本地图片再次替换更新
2.视频定时轮播时间间隔1min改5min
This commit is contained in:
@@ -31,8 +31,8 @@ public class ADSWindowManager implements HomeMultiView.MultiViewListener{
|
||||
private MyHandler mHandler;
|
||||
|
||||
/**广告延迟播放时间*/
|
||||
// private static final long DELAYED_TIME=1000*60*5;
|
||||
private static final long DELAYED_TIME=1000*60*1;
|
||||
private static final long DELAYED_TIME=1000*60*5;
|
||||
// private static final long DELAYED_TIME=1000*60*1;
|
||||
|
||||
/**是否开启播放模式*/
|
||||
private boolean isPlayMode=false;
|
||||
|
||||
@@ -53,6 +53,7 @@ public class AdMultiView extends MultiView {
|
||||
private int oldMargintop=0;
|
||||
|
||||
private int mAdState = -1;
|
||||
private int imageResId;
|
||||
|
||||
public AdMultiView(@NonNull Context context) {
|
||||
super(context);
|
||||
@@ -87,7 +88,7 @@ public class AdMultiView extends MultiView {
|
||||
try {
|
||||
|
||||
int titleResId = a.getResourceId(R.styleable.AdMultiView_adMultiViewTitle,-1);
|
||||
int imageResId = a.getResourceId(R.styleable.AdMultiView_adMultiViewImage,-1);
|
||||
imageResId = a.getResourceId(R.styleable.AdMultiView_adMultiViewImage,-1);
|
||||
|
||||
if(titleResId!=-1){
|
||||
tx_view.setText(titleResId);
|
||||
@@ -95,7 +96,7 @@ public class AdMultiView extends MultiView {
|
||||
} else {
|
||||
tx_view.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if(imageResId!=-1){
|
||||
if(imageResId !=-1){
|
||||
img_view.setImageResource(imageResId);
|
||||
}
|
||||
|
||||
@@ -133,7 +134,7 @@ public class AdMultiView extends MultiView {
|
||||
File tmpfile= new File(path);
|
||||
LogUtils.loge("AdMultiView tmpfile===>"+tmpfile.exists());
|
||||
if(tmpfile.exists()) {
|
||||
Glide.with(mContext).load(tmpfile).into(img_view);
|
||||
Glide.with(mContext).load(tmpfile).placeholder(imageResId).into(img_view);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ public class HomeMultiView extends MultiView {
|
||||
private int animDuration=50;
|
||||
|
||||
private View mMultiInsideLayout;
|
||||
private int imageResId;
|
||||
|
||||
|
||||
public HomeMultiView(@NonNull Context context) {
|
||||
@@ -98,7 +99,7 @@ public class HomeMultiView extends MultiView {
|
||||
TypedArray a= context.getTheme().obtainStyledAttributes(attrs,R.styleable.MultiView,0,0);
|
||||
try {
|
||||
int titleResId = a.getResourceId(R.styleable.MultiView_multiViewTitle,-1);
|
||||
int imageResId = a.getResourceId(R.styleable.MultiView_multiViewImage,-1);
|
||||
imageResId = a.getResourceId(R.styleable.MultiView_multiViewImage,-1);
|
||||
boolean adsSwitch = a.getBoolean(R.styleable.MultiView_adsSwitch,false);
|
||||
if(titleResId!=-1){
|
||||
tx_view.setText(titleResId);
|
||||
@@ -107,7 +108,7 @@ public class HomeMultiView extends MultiView {
|
||||
tx_view.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
if(imageResId!=-1){
|
||||
if(imageResId !=-1){
|
||||
img_view.setImageResource(imageResId);
|
||||
}
|
||||
|
||||
@@ -196,7 +197,7 @@ public class HomeMultiView extends MultiView {
|
||||
File tmpfile= new File(path);
|
||||
LogUtils.loge("tmpfile===>"+tmpfile.exists());
|
||||
if(tmpfile.exists()) {
|
||||
Glide.with(mContext).load(tmpfile).into(img_view);
|
||||
Glide.with(mContext).load(tmpfile).placeholder(imageResId).into(img_view);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,13 +147,13 @@ public class SplashView {
|
||||
|
||||
if(adsInfoBeanInfo==null){
|
||||
LogUtils.loge("adsInfoBeanInfo is null===>");
|
||||
mHandler.sendEmptyMessageDelayed(2,10000);
|
||||
mHandler.sendEmptyMessage(2);
|
||||
return ;
|
||||
}
|
||||
|
||||
if(adsInfoBeanInfo.getLocalFilePath()==null){
|
||||
LogUtils.loge("getLocalFilePath is null===>");
|
||||
mHandler.sendEmptyMessageDelayed(2,10000);
|
||||
mHandler.sendEmptyMessage(2);
|
||||
return ;
|
||||
}
|
||||
File file = new File(adsInfoBeanInfo.getLocalFilePath());
|
||||
@@ -165,7 +165,7 @@ public class SplashView {
|
||||
LogUtils.loge("下载大小完成但重命名失败同时下载任务已清除图片至始至终未显示优化处理 system rename file file bug compose");
|
||||
}else {
|
||||
LogUtils.loge("file is not exits===>");
|
||||
mHandler.sendEmptyMessageDelayed(2,10000);
|
||||
mHandler.sendEmptyMessage(2);
|
||||
return ;
|
||||
}
|
||||
}
|
||||
@@ -173,7 +173,7 @@ public class SplashView {
|
||||
|
||||
if(adsInfoBeanInfo.getState()==0){
|
||||
LogUtils.loge("splash task is closd ");
|
||||
mHandler.sendEmptyMessageDelayed(2,5000);
|
||||
mHandler.sendEmptyMessage(2);
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user