Commit 905f3de6 authored by mengcuiguang's avatar mengcuiguang

添加看广告次数字段

parent 4d4c2838
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="CompilerConfiguration"> <component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" /> <bytecodeTargetLevel target="1.8" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -12,8 +12,8 @@ android { ...@@ -12,8 +12,8 @@ android {
applicationId "com.mints.helivideo" applicationId "com.mints.helivideo"
minSdkVersion rootProject.ext.androidMinSdkVersion minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 7 versionCode 8
versionName "1.0.6" versionName "1.0.7"
flavorDimensions "default" flavorDimensions "default"
// dex突破65535的限制 // dex突破65535的限制
......
...@@ -10,6 +10,8 @@ public class RecommendBean implements Serializable { ...@@ -10,6 +10,8 @@ public class RecommendBean implements Serializable {
private String showVedioUrl; private String showVedioUrl;
private int adShowCount;
public VedioBean getVedioMsg() { public VedioBean getVedioMsg() {
return vedioMsg; return vedioMsg;
...@@ -26,4 +28,12 @@ public class RecommendBean implements Serializable { ...@@ -26,4 +28,12 @@ public class RecommendBean implements Serializable {
public void setShowVedioUrl(String showVedioUrl) { public void setShowVedioUrl(String showVedioUrl) {
this.showVedioUrl = showVedioUrl; this.showVedioUrl = showVedioUrl;
} }
public int getAdShowCount() {
return adShowCount;
}
public void setAdShowCount(int adShowCount) {
this.adShowCount = adShowCount;
}
} }
...@@ -402,11 +402,11 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -402,11 +402,11 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
val mainTwoRecommend = val mainTwoRecommend =
AppPreferencesManager.get().getBoolean(Constant.MAIN_TWO_RECOMMEND, false) AppPreferencesManager.get().getBoolean(Constant.MAIN_TWO_RECOMMEND, false)
val adCount = AppPreferencesManager.get().getInt(Constant.VEDIO_AD_COUNT, 0) val adCount = AppPreferencesManager.get().getInt(Constant.VEDIO_AD_COUNT, 0)
if (!mainTwoRecommend && adCount > 10) { if (!mainTwoRecommend && adCount > data!!.vedio3.adShowCount) {
AppPreferencesManager.get().put(Constant.MAIN_TWO_RECOMMEND, true) AppPreferencesManager.get().put(Constant.MAIN_TWO_RECOMMEND, true)
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
val bundle = Bundle() val bundle = Bundle()
bundle.putString(Constant.VEDIO_BEAN, JsonUtil.toJson(data)) bundle.putString(Constant.VEDIO_BEAN, JsonUtil.toJson(data.vedio3))
readyGo(RecommendActivity::class.java, bundle) readyGo(RecommendActivity::class.java, bundle)
}, 300) }, 300)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment