Commit eb5910dd authored by Your Name's avatar Your Name

迭代

parent a22d829e
......@@ -213,14 +213,14 @@ public class CleanJunkActivity extends BaseActivity<ActivityCleanJunkBinding> {
binding.emptyFilesRecy.setVisibility(View.VISIBLE);
}
});
SharedPreferences prefs = getSharedPreferences("AppPrefs", MODE_PRIVATE);
sharedPreferences = getSharedPreferences("AppPrefs", MODE_PRIVATE);
binding.buttonCleanUp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (view != null) {
boolean cleaned = prefs.getBoolean("cleaned", false);
boolean cleaned = sharedPreferences.getBoolean("cleaned", false);
if (!cleaned){
SharedPreferences.Editor editor = prefs.edit();
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("cleaned", true);
editor.commit();
}
......@@ -240,7 +240,6 @@ public class CleanJunkActivity extends BaseActivity<ActivityCleanJunkBinding> {
} else {
initQueryEmptyFiles();
}
sharedPreferences = getSharedPreferences("AppPrefs", MODE_PRIVATE);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
......@@ -703,7 +702,5 @@ public class CleanJunkActivity extends BaseActivity<ActivityCleanJunkBinding> {
if (binding != null) {
binding = null;
}
}
}
\ No newline at end of file
......@@ -36,14 +36,19 @@ public class EndCleanJunkActivity extends BaseActivity<ActivityEndCleanJunkBindi
initShow();
}
private void initPage() {
binding.clRadarview.setVisibility(View.VISIBLE);
@Override
protected void onResume() {
super.onResume();
AdmobManager.INSTANCE.showNativeAd(EndCleanJunkActivity.this, (nativeAd) -> {
binding.flAdDonghua.removeAllViews();
binding.flAdDonghua.setNativeAd(nativeAd, R.layout.layout_ad_native);
return null;
}, null, null);
}
private void initPage() {
binding.clRadarview.setVisibility(View.VISIBLE);
binding.radarview.setSearching(true);
initAnimotorPer();
countDownTimer = new CountDownTimer(5000, 1000) {
......@@ -60,19 +65,26 @@ public class EndCleanJunkActivity extends BaseActivity<ActivityEndCleanJunkBindi
binding.clRadarview.setVisibility(View.GONE);
LoadingDialog loadingDialog = new LoadingDialog(EndCleanJunkActivity.this);
loadingDialog.show();
AdmobManager.INSTANCE.showInterstitialAd(EndCleanJunkActivity.this, () -> {
return null;
},
() -> {
loadingDialog.dismiss();
binding.flAdDonghua.removeAllViews();
return null;
},
() -> {
loadingDialog.dismiss();
binding.flAdDonghua.removeAllViews();
return null;
}, false);
if (AdmobManager.INSTANCE.isShowAdInter()) {
AdmobManager.INSTANCE.showInterstitialAd(EndCleanJunkActivity.this, () -> {
loadingDialog.dismiss();
binding.flAdDonghua.removeAllViews();
return null;
},
() -> {
loadingDialog.dismiss();
binding.flAdDonghua.removeAllViews();
return null;
},
() -> {
loadingDialog.dismiss();
binding.flAdDonghua.removeAllViews();
return null;
}, false);
}else {
loadingDialog.dismiss();
binding.flAdDonghua.removeAllViews();
}
}
}.start();
AdmobManager.INSTANCE.showNativeAd(EndCleanJunkActivity.this, (nativeAd) -> {
......@@ -80,6 +92,7 @@ public class EndCleanJunkActivity extends BaseActivity<ActivityEndCleanJunkBindi
binding.flAd.setNativeAd(nativeAd, R.layout.layout_ad_native);
return null;
}, null, null);
}
private void initAnimotorPer() {
......
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