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