V1.0.4(5) 广告场景:开屏、分类进入列表、下载按钮点击、设置壁纸弹窗上的三个按钮点击
This commit is contained in:
parent
0057aa81de
commit
c5b98b1a3e
@ -20,18 +20,18 @@ android {
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
//com.tool.minimalistwallpaper
|
||||
applicationId = "com.tool.minimalistwallpaper"
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
versionCode = 4
|
||||
versionName = "1.0.3"
|
||||
versionCode = 5
|
||||
versionName = "1.0.4"
|
||||
setProperty("archivesBaseName", "minimalistwallpaper_v" + versionName + "(${versionCode})_$timestamp")
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isShrinkResources =true
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 4,
|
||||
"versionName": "1.0.3",
|
||||
"outputFile": "minimalistwallpaper_v1.0.3(4)_08_19_14_22-release.apk"
|
||||
"versionCode": 5,
|
||||
"versionName": "1.0.4",
|
||||
"outputFile": "minimalistwallpaper_v1.0.4(5)_08_27_16_28-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
|
||||
100
app/src/main/assets/Minimalist_Wallpaper_privacy.html
Normal file
100
app/src/main/assets/Minimalist_Wallpaper_privacy.html
Normal file
@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Privacy Policy</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
margin: 20px;
|
||||
padding: 0;
|
||||
}
|
||||
h1, h2 {
|
||||
color: #333;
|
||||
}
|
||||
p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.section {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
a {
|
||||
color: #1a0dab;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Privacy Policy</h1>
|
||||
<div class="section">
|
||||
<p>This page is used to inform users regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.</p>
|
||||
<p>If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The personal information that we collect is used for providing and improving the service. We will not use or share your information with anyone except as described in this Privacy Policy.</p>
|
||||
<p>The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Minimalist Wallpaper app unless otherwise defined in this Privacy Policy.</p>
|
||||
</div>
|
||||
|
||||
<h2>Information Collection and Use</h2>
|
||||
<div class="section">
|
||||
<p>For a better experience, while using our service, we may require you to provide us with certain personally identifiable information. The information that we request will be retained on your device and is not collected by us in any way.</p>
|
||||
<p>The app does use third party services that may collect information used to identify you.</p>
|
||||
<p>Please refer to the privacy policy of the third-party service provider used by the application.</p>
|
||||
<ul>
|
||||
<li>Applovin</li>
|
||||
<li>Liftoff</li>
|
||||
<li>Pangle</li>
|
||||
<li>Firebase Analytics</li>
|
||||
<li>Facebook</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h2>Log Data</h2>
|
||||
<div class="section">
|
||||
<p>We want to inform you that whenever you use our service, in a case of an error in the app we collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol ("IP") address, device name, operating system version, the configuration of the app when utilizing our Service, the time and date of your use of the Service, and other statistics.</p>
|
||||
</div>
|
||||
|
||||
<h2>Cookies</h2>
|
||||
<div class="section">
|
||||
<p>Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.</p>
|
||||
<p>This Service does not use these "cookies" explicitly. However, the app may use third party code and libraries that use "cookies" to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.</p>
|
||||
</div>
|
||||
|
||||
<h2>Service Providers</h2>
|
||||
<div class="section">
|
||||
<p>We may employ third-party companies and individuals due to the following reasons:</p>
|
||||
<ul>
|
||||
<li>To facilitate our Service;</li>
|
||||
<li>To provide the Service on our behalf;</li>
|
||||
<li>To perform Service-related services;</li>
|
||||
<li>To assist us in analyzing how our Service is used.</li>
|
||||
</ul>
|
||||
<p>We want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.</p>
|
||||
</div>
|
||||
|
||||
<h2>Security</h2>
|
||||
<div class="section">
|
||||
<p>We value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and we cannot guarantee its absolute security.</p>
|
||||
</div>
|
||||
|
||||
<h2>Links to Other Sites</h2>
|
||||
<div class="section">
|
||||
<p>This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by us. Therefore, we strongly advise you to review the Privacy Policy of these websites. We have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.</p>
|
||||
</div>
|
||||
|
||||
<h2>Children's Privacy</h2>
|
||||
<div class="section">
|
||||
<p>These Services do not address anyone under the age of 13. We do not collect personally identifiable information from children under 13. In the case we discover that a child under 13 has provided us with personal information, we will immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact us so that we will be able to do necessary actions.</p>
|
||||
</div>
|
||||
|
||||
<h2>Changes to This Privacy Policy</h2>
|
||||
<div class="section">
|
||||
<p>We may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.</p>
|
||||
</div>
|
||||
|
||||
<h2>Contact Us</h2>
|
||||
<div class="section">
|
||||
<p>If you have any questions, please contact us.</p>
|
||||
<p>Email: <a href="mailto:amithchamara832@gmail.com">amithchamara832@gmail.com</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,122 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Privacy Policy</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 20px;
|
||||
}
|
||||
h1, h2 {
|
||||
color: #333;
|
||||
}
|
||||
h2 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
ul {
|
||||
margin: 10px 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Privacy Policy</h1>
|
||||
<p><strong>Date:</strong> August 19, 2024</p>
|
||||
|
||||
<p>We provide this Privacy Policy to help you understand how we collect, use, and disclose
|
||||
information, including what you may provide to us or that we obtain from our products and
|
||||
services. We treat your privacy very seriously. Your privacy is important to us.</p>
|
||||
|
||||
<h2>Information Collection and Use</h2>
|
||||
<p>For a better experience, while using our Service, we may require you to provide us with certain
|
||||
personally identifiable information, such as users' name, address, location, pictures, etc. The
|
||||
information that we request will be retained on your device and is not collected or retained by
|
||||
us in any way and used as described in this privacy policy.</p>
|
||||
<p>The app does use third-party services that may collect information used to identify you.</p>
|
||||
<p>Please refer to the privacy policy of the third-party service provider used by the
|
||||
application:</p>
|
||||
<ul>
|
||||
<li>Google Play Services</li>
|
||||
<li>Google Analytics for Firebase</li>
|
||||
<li>Firebase Crashlytics</li>
|
||||
<li>Unity</li>
|
||||
<li>AppLovin</li>
|
||||
<li>Pangle</li>
|
||||
<li>Mintegral</li>
|
||||
<li>Bigo</li>
|
||||
<li>Ironsource</li>
|
||||
<li>Vungle</li>
|
||||
</ul>
|
||||
|
||||
<h2>Log Data</h2>
|
||||
<p>We want to inform you that whenever you use our Service, in case of an error in the app, we
|
||||
collect data and information (through third-party products) on your phone called Log Data. This
|
||||
Log Data may include information such as your device Internet Protocol (“IP”) address, device
|
||||
name, operating system version, the configuration of the app when utilizing our Service, the
|
||||
time and date of your use of the Service, and other statistics.</p>
|
||||
|
||||
<h2>Cookies</h2>
|
||||
<p>Cookies are files with a small amount of data that are commonly used as anonymous unique
|
||||
identifiers. These are sent to your browser from the websites that you visit and are stored on
|
||||
your device's internal memory.</p>
|
||||
<p>This Service does not use these “cookies” explicitly. However, the app may use third-party code
|
||||
and libraries that use “cookies” to collect information and improve their services. You have the
|
||||
option to either accept or refuse these cookies and know when a cookie is being sent to your
|
||||
device. If you choose to refuse our cookies, you may not be able to use some portions of this
|
||||
Service.</p>
|
||||
|
||||
<h2>Service Providers</h2>
|
||||
<p>We may employ third-party companies and individuals due to the following reasons:</p>
|
||||
<ul>
|
||||
<li>To facilitate our Service</li>
|
||||
<li>To provide the Service on our behalf</li>
|
||||
<li>To perform Service-related services</li>
|
||||
<li>To assist us in analyzing how our Service is used</li>
|
||||
</ul>
|
||||
<p>We want to inform users of this Service that these third parties have access to their Personal
|
||||
Information. The reason is to perform the tasks assigned to them on our behalf. However, they
|
||||
are obligated not to disclose or use the information for any other purpose.</p>
|
||||
|
||||
<h2>Security</h2>
|
||||
<p>We value your trust in providing us your Personal Information, thus we are striving to use
|
||||
commercially acceptable means of protecting it. But remember that no method of transmission over
|
||||
the internet, or method of electronic storage is 100% secure and reliable, and we cannot
|
||||
guarantee its absolute security.</p>
|
||||
|
||||
<h2>Links to Other Sites</h2>
|
||||
<p>This Service may contain links to other sites. If you click on a third-party link, you will be
|
||||
directed to that site. Note that these external sites are not operated by us. Therefore, we
|
||||
strongly advise you to review the Privacy Policy of these websites. We have no control over and
|
||||
assume no responsibility for the content, privacy policies, or practices of any third-party
|
||||
sites or services.</p>
|
||||
|
||||
<h2>Children’s Privacy</h2>
|
||||
<p>These Services do not address anyone under the age of 13. We do not knowingly collect personally
|
||||
identifiable information from children under 13 years of age. In the case we discover that a
|
||||
child under 13 has provided us with personal information, we will immediately delete this from
|
||||
our servers. If you are a parent or guardian and you are aware that your child has provided us
|
||||
with personal information, please contact us so that we will be able to take the necessary
|
||||
actions.</p>
|
||||
|
||||
<h2>Changes to This Privacy Policy</h2>
|
||||
<p>We may update our Privacy Policy from time to time. Thus, you are advised to review this page
|
||||
periodically for any changes. We will notify you of any changes by posting the new Privacy
|
||||
Policy on this page.</p>
|
||||
|
||||
<h2>Privacy Questions</h2>
|
||||
<p>We may update the Privacy Policy from time to time. When we change the policy in a material way,
|
||||
a notice will be posted on our website along with the updated Privacy Policy.</p>
|
||||
<p>If you have any questions or concerns about our Privacy Policy or data processing, please contact
|
||||
us: <a href="mailto:amithchamara832@gmail.com">amithchamara832@gmail.com</a>.</p>
|
||||
</body>
|
||||
</html>
|
||||
@ -36,6 +36,8 @@ public class MinimalistWPSkin extends Application {
|
||||
private static final String MAX_SDK = "NprBImK6BeQcxVNp44x4_ikQeJmyfGD8OEHbpNDUu7_WudCrCm_TIKr807Zzd8rfb6TG5NITCTxbZHZT9PbAGa";
|
||||
public static Boolean initSDK = false;
|
||||
|
||||
public static String TAG = "-------Wallpaper----------";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
@ -74,10 +76,10 @@ public class MinimalistWPSkin extends Application {
|
||||
public void onSdkInitialized(final AppLovinSdkConfiguration sdkConfig) {
|
||||
initSDK = true;
|
||||
Log.e("zzj", "------------initSDk--------success");
|
||||
LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(AD_BROADCAST));
|
||||
LocalBroadcastManager.getInstance(MinimalistWPSkin.app).sendBroadcast(new Intent(AD_BROADCAST));
|
||||
}
|
||||
});
|
||||
AppLovinSdk.getInstance(this).getSettings().setVerboseLogging(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,8 @@ import com.tool.minimalistwallpaper.adapter.MainRvAdapter;
|
||||
import com.tool.minimalistwallpaper.data.MydataBase;
|
||||
import com.tool.minimalistwallpaper.data.Otherdata;
|
||||
import com.tool.minimalistwallpaper.databinding.ActivityAllBinding;
|
||||
import com.tool.minimalistwallpaper.max.MaxManager;
|
||||
import com.tool.minimalistwallpaper.max.onAdAfterAction;
|
||||
import com.tool.minimalistwallpaper.tools.Adcallback;
|
||||
import com.tool.minimalistwallpaper.tools.Mytools;
|
||||
import com.tool.minimalistwallpaper.tools.SpaceItem;
|
||||
@ -42,6 +44,12 @@ public class AllActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityAllBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
MaxManager.startShowMaxAd(AllActivity.this, new onAdAfterAction() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_all), (v, insets) -> {
|
||||
@ -50,7 +58,7 @@ public class AllActivity extends AppCompatActivity {
|
||||
return insets;
|
||||
});
|
||||
|
||||
adsList = Mytools.getAllAd();
|
||||
|
||||
|
||||
Intent intent = getIntent();
|
||||
name = intent.getStringExtra(StaticValue.KEY_name);
|
||||
@ -60,31 +68,12 @@ public class AllActivity extends AppCompatActivity {
|
||||
binding.allBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showAd();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void showAd() {
|
||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||
if (cachedAd == null) {
|
||||
finish();
|
||||
} else {
|
||||
Mytools.setCallBcak(cachedAd, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
cachedAd.showAd(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
Mytools.runIO(new Runnable() {
|
||||
@ -116,9 +105,5 @@ public class AllActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
showAd();
|
||||
}
|
||||
|
||||
}
|
||||
@ -52,8 +52,12 @@ import com.tool.minimalistwallpaper.R;
|
||||
import com.tool.minimalistwallpaper.data.MydataBase;
|
||||
import com.tool.minimalistwallpaper.data.Otherdata;
|
||||
import com.tool.minimalistwallpaper.databinding.ActivityPreViewBinding;
|
||||
import com.tool.minimalistwallpaper.max.MaxManager;
|
||||
import com.tool.minimalistwallpaper.max.onAdAfterAction;
|
||||
import com.tool.minimalistwallpaper.tools.Adcallback;
|
||||
import com.tool.minimalistwallpaper.tools.Mytools;
|
||||
import com.tool.minimalistwallpaper.tools.SetCallback;
|
||||
import com.tool.minimalistwallpaper.tools.SetDialogFragment;
|
||||
import com.tool.minimalistwallpaper.tools.StaticValue;
|
||||
import com.tool.minimalistwallpaper.tools.Utils;
|
||||
|
||||
@ -82,7 +86,7 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
public static boolean KEY_Change = false;
|
||||
private Otherdata checkdata = new Otherdata();
|
||||
private static List<MaxInterstitialAd> adsList;
|
||||
private Dialog dialog;
|
||||
private SetDialogFragment dialog;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
@ -98,7 +102,7 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
return insets;
|
||||
});
|
||||
|
||||
adsList = Mytools.getAllAd();
|
||||
|
||||
|
||||
initData();
|
||||
initEvent();
|
||||
@ -138,6 +142,10 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
binding.preSetwp.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (setmap == null) {
|
||||
Toast.makeText(PreViewActivity.this, getString(R.string.load_fail), Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
showDg();
|
||||
}
|
||||
|
||||
@ -145,9 +153,14 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
binding.preDownwp.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
binding.imgDownload.setVisibility(View.GONE);
|
||||
binding.pgDonwnload.setVisibility(View.VISIBLE);
|
||||
downWp();
|
||||
MaxManager.startShowMaxAd(PreViewActivity.this, new onAdAfterAction() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
binding.imgDownload.setVisibility(View.GONE);
|
||||
binding.pgDonwnload.setVisibility(View.VISIBLE);
|
||||
downWp();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -168,33 +181,33 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
binding.preImage.setOnTouchListener(new View.OnTouchListener() {
|
||||
private Handler handler = new Handler();
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
gestureDetector.onTouchEvent(event);
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
binding.consBack.setVisibility(View.GONE);
|
||||
hidemenu();
|
||||
}
|
||||
}, 1000);
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
showmenu();
|
||||
binding.consBack.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
// binding.preImage.setOnTouchListener(new View.OnTouchListener() {
|
||||
// private Handler handler = new Handler();
|
||||
//
|
||||
// @SuppressLint("ClickableViewAccessibility")
|
||||
// @Override
|
||||
// public boolean onTouch(View v, MotionEvent event) {
|
||||
// gestureDetector.onTouchEvent(event);
|
||||
// switch (event.getAction()) {
|
||||
// case MotionEvent.ACTION_DOWN:
|
||||
// handler.postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// binding.consBack.setVisibility(View.GONE);
|
||||
// hidemenu();
|
||||
// }
|
||||
// }, 1000);
|
||||
// break;
|
||||
// case MotionEvent.ACTION_UP:
|
||||
// handler.removeCallbacksAndMessages(null);
|
||||
// showmenu();
|
||||
// binding.consBack.setVisibility(View.VISIBLE);
|
||||
// break;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@ -220,65 +233,22 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void showDg() {
|
||||
dialog = new Dialog(this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.setContentView(R.layout.dialog);
|
||||
dialog.setCancelable(true);
|
||||
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
||||
lp.copyFrom(dialog.getWindow().getAttributes());
|
||||
lp.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
|
||||
dialog.findViewById(R.id.both_pg).setVisibility(View.GONE);
|
||||
dialog.findViewById(R.id.lock_pg).setVisibility(View.GONE);
|
||||
dialog.findViewById(R.id.home_pg).setVisibility(View.GONE);
|
||||
dialog.findViewById(R.id.dialog_lock).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.findViewById(R.id.lock_pg).setVisibility(View.VISIBLE);
|
||||
dialog.findViewById(R.id.lock_text).setVisibility(View.GONE);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
showAd(WallpaperManager.FLAG_LOCK);
|
||||
// Log.e("zzj", "---FLAG_LOCK---");
|
||||
} else {
|
||||
showAd(123);
|
||||
}
|
||||
}
|
||||
});
|
||||
dialog.findViewById(R.id.dialog_both).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.findViewById(R.id.both_pg).setVisibility(View.VISIBLE);
|
||||
dialog.findViewById(R.id.both_text).setVisibility(View.GONE);
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
//// showAd(WallpaperManager.FLAG_LOCK | WallpaperManager.FLAG_SYSTEM);
|
||||
//// setWp(setmap, WallpaperManager.FLAG_LOCK | WallpaperManager.FLAG_SYSTEM);
|
||||
// Log.e("zzj", "---both---");
|
||||
// } else {
|
||||
// setALLWp(setmap);
|
||||
// }
|
||||
showAd(123);
|
||||
}
|
||||
});
|
||||
dialog.findViewById(R.id.dialog_home).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.findViewById(R.id.home_pg).setVisibility(View.VISIBLE);
|
||||
dialog.findViewById(R.id.home_text).setVisibility(View.GONE);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
showAd(WallpaperManager.FLAG_SYSTEM);
|
||||
} else {
|
||||
showAd(123);
|
||||
if (dialog == null) {
|
||||
dialog = SetDialogFragment.newInstance(new SetCallback() {
|
||||
@Override
|
||||
public void onAction(int flag) {
|
||||
MaxManager.startShowMaxAd(PreViewActivity.this, new onAdAfterAction() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setWp(setmap, flag);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
dialog.show(getSupportFragmentManager(),"");
|
||||
|
||||
dialog.show();
|
||||
dialog.getWindow().setAttributes(lp);
|
||||
|
||||
}
|
||||
|
||||
@ -358,8 +328,7 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && Flag != -1) {
|
||||
wallpaperManager.setBitmap(bitmap, null, false, Flag);
|
||||
} else {
|
||||
wallpaperManager.setBitmap(bitmap);
|
||||
@ -372,26 +341,6 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
}).start();
|
||||
}
|
||||
|
||||
private void setALLWp(Bitmap bitmap) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
wallpaperManager.setBitmap(bitmap);
|
||||
} catch (IOException a) {
|
||||
a.printStackTrace();
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
public Uri getImageUri(Context context, Bitmap bitmap) {
|
||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
|
||||
String path = MediaStore.Images.Media.insertImage(context.getContentResolver(), bitmap, "Title", null);
|
||||
return Uri.parse(path);
|
||||
}
|
||||
|
||||
|
||||
private void checkLike() {
|
||||
if (!islike) {
|
||||
@ -402,7 +351,7 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void run() {
|
||||
MydataBase.getInstance().myDAO().update(otherdata);
|
||||
// Log.e("zzj", "checkLike true " + otherdata.source);
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -413,7 +362,7 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void run() {
|
||||
MydataBase.getInstance().myDAO().update(otherdata);
|
||||
// Log.e("zzj", "checkLike false " + otherdata.source);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -450,8 +399,6 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
Glide.with(this)
|
||||
.asBitmap()
|
||||
.load(preurl)
|
||||
// .encodeQuality(50)
|
||||
// .encodeFormat(Bitmap.CompressFormat.JPEG)
|
||||
.into(new CustomTarget<Bitmap>() {
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
|
||||
@ -463,6 +410,13 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
showmenu();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||
super.onLoadFailed(errorDrawable);
|
||||
binding.prePg.setVisibility(View.GONE);
|
||||
Toast.makeText(PreViewActivity.this, getString(R.string.load_fail), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
|
||||
@ -481,41 +435,17 @@ public class PreViewActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
// Log.e("zzj", " preview onPause ");
|
||||
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if (otherdata.getLike() != checkdata.getLike()) {
|
||||
// Log.e("zzj", " preview === saveotherlike " + otherdata.getLike());
|
||||
otherdata.setLike(false);
|
||||
KEY_Change = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// unregisterReceiver(wallpaperChangedReceiver);
|
||||
}
|
||||
|
||||
private void showAd(int Flag) {
|
||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||
|
||||
if (cachedAd == null) {
|
||||
setWp(setmap, Flag);
|
||||
} else {
|
||||
Mytools.setCallBcak(cachedAd, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
setWp(setmap, Flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
setWp(setmap, Flag);
|
||||
}
|
||||
});
|
||||
cachedAd.showAd(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -14,25 +14,31 @@ import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.applovin.sdk.AppLovinSdk;
|
||||
import com.tool.minimalistwallpaper.MinimalistWPSkin;
|
||||
import com.tool.minimalistwallpaper.R;
|
||||
import com.tool.minimalistwallpaper.max.WelComManager;
|
||||
import com.tool.minimalistwallpaper.tools.Adcallback;
|
||||
import com.tool.minimalistwallpaper.tools.CustomProgressBar;
|
||||
import com.tool.minimalistwallpaper.tools.Mytools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
public class SplashActivity extends AppCompatActivity {
|
||||
private CountDownTimer countDownTimer;
|
||||
private static List<MaxInterstitialAd> adsList;
|
||||
public static boolean isAlreadyShow = false;
|
||||
private float i = 0;
|
||||
|
||||
|
||||
private long totalTime = 11000;
|
||||
private CustomProgressBar customProgressBar;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
@ -46,80 +52,28 @@ public class SplashActivity extends AppCompatActivity {
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
CustomProgressBar customProgressBar = findViewById(R.id.splash_pg);
|
||||
countDownTimer = new CountDownTimer(10100, 100) {
|
||||
customProgressBar = findViewById(R.id.splash_pg);
|
||||
customProgressBar.setProgress(5);
|
||||
countDownTimer = WelComManager.initTimer(SplashActivity.this, totalTime, new Function1<Long, Unit>() {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
i++;
|
||||
customProgressBar.setProgress(i);
|
||||
if (!isAlreadyShow) {
|
||||
showAdOrStartView(false);
|
||||
}
|
||||
public Unit invoke(Long aLong) {
|
||||
Float percentage = 100 - (float) aLong / totalTime * 100;
|
||||
customProgressBar.setProgress(percentage);
|
||||
return null;
|
||||
}
|
||||
|
||||
}, new Function0<Unit>() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (!isAlreadyShow) {
|
||||
showAdOrStartView(true);
|
||||
}
|
||||
public Unit invoke() {
|
||||
startMain();
|
||||
return null;
|
||||
}
|
||||
};
|
||||
registerBroadcastReceiver();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void showAdOrStartView(boolean go) {
|
||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||
if (cachedAd == null) {
|
||||
isAlreadyShow = false;
|
||||
if (go) {
|
||||
satrView();
|
||||
}
|
||||
} else {
|
||||
isAlreadyShow = true;
|
||||
Mytools.setCallBcak(cachedAd, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
Log.e("zzj", "------------onShowFail--------fail");
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
}
|
||||
satrView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
isAlreadyShow = true;
|
||||
satrView();
|
||||
}
|
||||
});
|
||||
cachedAd.showAd();
|
||||
}
|
||||
}
|
||||
|
||||
private void registerBroadcastReceiver() {
|
||||
if (!MinimalistWPSkin.initSDK) {
|
||||
BroadcastReceiver receiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
// AppLovinSdk.getInstance( SplashActivity.this ).showMediationDebugger();
|
||||
Log.e("zzj", "------------loadAndStartAd--------success");
|
||||
loadAndStartAd();
|
||||
}
|
||||
};
|
||||
|
||||
LocalBroadcastManager.getInstance(this).registerReceiver(receiver, new IntentFilter(MinimalistWPSkin.AD_BROADCAST));
|
||||
} else {
|
||||
Log.e("zzj", "------------loadAndStartAd--------fail");
|
||||
loadAndStartAd();
|
||||
}
|
||||
}
|
||||
|
||||
private void loadAndStartAd() {
|
||||
adsList = Mytools.getAllAd();
|
||||
countDownTimer.start();
|
||||
}
|
||||
|
||||
private void satrView() {
|
||||
private void startMain() {
|
||||
customProgressBar.setProgress(100);
|
||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
@ -128,6 +82,10 @@ public class SplashActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
countDownTimer = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -7,8 +7,10 @@ import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.tool.minimalistwallpaper.R;
|
||||
|
||||
@ -29,6 +31,15 @@ public class WebActivity extends AppCompatActivity {
|
||||
WebView webView = findViewById(R.id.web);
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
webView.setWebViewClient(new WebViewClient());
|
||||
webView.loadUrl("file:///android_asset/privacy.html");
|
||||
webView.loadUrl("file:///android_asset/Minimalist_Wallpaper_privacy.html");
|
||||
|
||||
ImageView back = findViewById(R.id.back);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@ -46,15 +46,7 @@ public class CategoryRvAdapter extends RecyclerView.Adapter<CategoryRvAdapter.Th
|
||||
myDataList = getUniqueDataList(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewRecycled(@NonNull ThumVH holder) {
|
||||
super.onViewRecycled(holder);
|
||||
// if (holder.getImageViewThumb() != null) {
|
||||
// Log.e("zzj", "+++++++++++++++++");
|
||||
// Glide.with(myContext)
|
||||
// .clear(holder.getImageViewThumb());
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
package com.tool.minimalistwallpaper.max;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
|
||||
public interface MaxListener {
|
||||
void onFail(MaxAd ad);
|
||||
|
||||
void onShowSuccess(MaxAd ad);
|
||||
|
||||
void onHidden();
|
||||
}
|
||||
@ -0,0 +1,181 @@
|
||||
package com.tool.minimalistwallpaper.max;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.MaxAdListener;
|
||||
import com.applovin.mediation.MaxError;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.tool.minimalistwallpaper.MinimalistWPSkin;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class MaxManager {
|
||||
/**
|
||||
* private static final String one_AD = "2377d38d18e72a02";
|
||||
* private static final String two_Ad = "cebc382a642385a6";
|
||||
* private static final String three_ad = "f4f1f8de8666c541";
|
||||
*/
|
||||
private static final String one_AD = "2377d38d18e72a02";
|
||||
private static final String two_Ad = "cebc382a642385a6";
|
||||
private static final String three_ad = "f4f1f8de8666c541";
|
||||
|
||||
|
||||
public static final int type_no_cache = 0;
|
||||
public static final int type_has_cache = 1;
|
||||
public static final int type_show_success = 2;
|
||||
public static final int type_show_close = 3;
|
||||
public static final int type_show_fail = 4;
|
||||
|
||||
private static List<MaxInterstitialAd> adList = new ArrayList<>();
|
||||
|
||||
public static MaxInterstitialAd getAd(List<MaxInterstitialAd> list) {
|
||||
Collections.shuffle(list);
|
||||
for (MaxInterstitialAd ad : list) {
|
||||
if (ad.isReady()) {
|
||||
return ad;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<MaxInterstitialAd> onLoadAd() {
|
||||
if (adList.isEmpty()) {
|
||||
MaxInterstitialAd AdT = new MaxInterstitialAd(two_Ad, MinimalistWPSkin.app);
|
||||
MaxInterstitialAd AdOne = new MaxInterstitialAd(one_AD, MinimalistWPSkin.app);
|
||||
MaxInterstitialAd AdThree = new MaxInterstitialAd(three_ad, MinimalistWPSkin.app);
|
||||
adList.add(AdOne);
|
||||
adList.add(AdT);
|
||||
adList.add(AdThree);
|
||||
}
|
||||
|
||||
for (MaxInterstitialAd ad : adList) {
|
||||
if (!ad.isReady()) {
|
||||
setMyListener(ad, new MaxListener() {
|
||||
@Override
|
||||
public void onFail(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowSuccess(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHidden() {
|
||||
|
||||
}
|
||||
});
|
||||
ad.loadAd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return adList;
|
||||
}
|
||||
|
||||
public static void setMyListener(MaxInterstitialAd ad, MaxListener maxListener) {
|
||||
ad.setListener(new MaxAdListener() {
|
||||
@Override
|
||||
public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||
Log.d(MinimalistWPSkin.TAG, "-------onAdLoaded-----maxAd=" + maxAd.getAdUnitId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||
Log.d(MinimalistWPSkin.TAG, "-------onAdDisplayed-----maxAd=" + maxAd.getAdUnitId());
|
||||
maxListener.onShowSuccess(maxAd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||
Log.d(MinimalistWPSkin.TAG, "-------onAdHidden-----maxAd=" + maxAd.getAdUnitId());
|
||||
maxListener.onHidden();
|
||||
setMyListener(ad, new MaxListener() {
|
||||
@Override
|
||||
public void onFail(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowSuccess(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHidden() {
|
||||
|
||||
}
|
||||
});
|
||||
ad.loadAd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||
Log.d(MinimalistWPSkin.TAG, "-------onAdLoadFailed-----s=" + s + "----maxError=" + maxError.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||
maxListener.onFail(maxAd);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected static void ShowAd(Activity activity, onAdStatusListener listener) {
|
||||
MaxInterstitialAd ad = MaxManager.getAd(adList);
|
||||
if (ad == null) {
|
||||
listener.onAdStatus(type_no_cache);
|
||||
} else {
|
||||
listener.onAdStatus(type_has_cache);
|
||||
MaxManager.setMyListener(ad, new MaxListener() {
|
||||
@Override
|
||||
public void onFail(MaxAd ad) {
|
||||
listener.onAdStatus(type_show_fail);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowSuccess(MaxAd ad) {
|
||||
listener.onAdStatus(type_show_success);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHidden() {
|
||||
listener.onAdStatus(type_show_close);
|
||||
}
|
||||
});
|
||||
ad.showAd(activity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void startShowMaxAd(Activity activity, onAdAfterAction listener) {
|
||||
MaxManager.ShowAd(activity, new onAdStatusListener() {
|
||||
@Override
|
||||
public void onAdStatus(int type) {
|
||||
if (type == MaxManager.type_show_close || type == MaxManager.type_show_fail || type == MaxManager.type_no_cache) {
|
||||
if (listener != null) {
|
||||
listener.onAction();
|
||||
Log.d(MinimalistWPSkin.TAG, "-------------showAd");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.tool.minimalistwallpaper.max
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.os.CountDownTimer
|
||||
import android.util.Log
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd
|
||||
import com.tool.minimalistwallpaper.MinimalistWPSkin
|
||||
|
||||
|
||||
object WelComManager {
|
||||
|
||||
private lateinit var timer: CountDownTimer
|
||||
|
||||
private var need_Show = true
|
||||
|
||||
private lateinit var lists: List<MaxInterstitialAd>
|
||||
|
||||
@JvmStatic
|
||||
fun initTimer(activity: Activity, countTime: Long,countAction: (Long) -> Unit, goMainAction: () -> Unit): CountDownTimer {
|
||||
need_Show = true
|
||||
timer = object : CountDownTimer(countTime, 100) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
countAction.invoke(millisUntilFinished)
|
||||
if (need_Show) {
|
||||
MaxManager.ShowAd(activity) {
|
||||
Log.d(MinimalistWPSkin.TAG, "--onTick----------it=$it")
|
||||
if (it == MaxManager.type_has_cache) {
|
||||
need_Show = false
|
||||
}
|
||||
if (it == MaxManager.type_show_close || it == MaxManager.type_show_fail) {
|
||||
Log.d(MinimalistWPSkin.TAG, "--onTick---------enter")
|
||||
goMainAction.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
if (need_Show) {
|
||||
MaxManager.ShowAd(activity) {
|
||||
if (it == MaxManager.type_show_close || it == MaxManager.type_show_fail || it == MaxManager.type_no_cache) {
|
||||
Log.d(MinimalistWPSkin.TAG, "--onFinish---------enter")
|
||||
goMainAction.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
startAd(activity)
|
||||
return timer
|
||||
}
|
||||
|
||||
private fun startAd(activity: Activity) {
|
||||
if (!MinimalistWPSkin.initSDK) {
|
||||
LocalBroadcastManager.getInstance(activity)
|
||||
.registerReceiver(object : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
lists = MaxManager.onLoadAd()
|
||||
timer.start()
|
||||
Log.d(MinimalistWPSkin.TAG, "------------1sucess")
|
||||
}
|
||||
}, IntentFilter(MinimalistWPSkin.AD_BROADCAST))
|
||||
} else {
|
||||
lists = MaxManager.onLoadAd()
|
||||
timer.start()
|
||||
Log.d(MinimalistWPSkin.TAG, "------------2sucess")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
package com.tool.minimalistwallpaper.max;
|
||||
|
||||
public interface onAdAfterAction {
|
||||
|
||||
void onAction();
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
package com.tool.minimalistwallpaper.max;
|
||||
|
||||
public interface onAdStatusListener {
|
||||
|
||||
void onAdStatus(int type);
|
||||
}
|
||||
@ -9,20 +9,31 @@ import android.graphics.RectF
|
||||
import android.graphics.Shader
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.tool.minimalistwallpaper.MinimalistWPSkin
|
||||
import com.tool.minimalistwallpaper.R
|
||||
|
||||
class CustomProgressBar(context: Context, attrs: AttributeSet?) : View(context, attrs) {
|
||||
private var progress = 0f // 当前进度
|
||||
private val maxProgress = 100f // 最大进度
|
||||
private val progressBarHeight = 20f // 进度条高度
|
||||
private val cornerRadius = 10f // 圆角半径
|
||||
private val backgroundColor = Color.parseColor("#26FFFFFF")
|
||||
private val startColor = Color.parseColor("#FF9ce8ff") // 起始颜色
|
||||
private val middleColor = Color.parseColor("#FFa4c4fb") // 中间颜色
|
||||
private val endColor = Color.parseColor("#FFbfa4ee") // 结束颜色
|
||||
private var backgroundColor = Color.parseColor("#ffaaaaaa")
|
||||
private var startColor = Color.parseColor("#ee782b") // 起始颜色
|
||||
private var middleColor = Color.parseColor("#ec6226") // 中间颜色
|
||||
private var endColor = Color.parseColor("#d6010d") // 结束颜色
|
||||
private val paint = Paint()
|
||||
private val paintTow = Paint()
|
||||
|
||||
init {
|
||||
|
||||
|
||||
backgroundColor = ContextCompat.getColor(MinimalistWPSkin.app, R.color.gray)
|
||||
startColor = ContextCompat.getColor(MinimalistWPSkin.app, R.color.start)
|
||||
middleColor = ContextCompat.getColor(MinimalistWPSkin.app, R.color.center)
|
||||
endColor = ContextCompat.getColor(MinimalistWPSkin.app, R.color.end)
|
||||
|
||||
|
||||
paint.style = Paint.Style.FILL
|
||||
paint.isAntiAlias = true
|
||||
paintTow.style = Paint.Style.FILL
|
||||
@ -34,7 +45,12 @@ class CustomProgressBar(context: Context, attrs: AttributeSet?) : View(context,
|
||||
// 绘制底色矩形
|
||||
paint.shader = null // 重置着色器
|
||||
paint.color = backgroundColor
|
||||
val backgroundRect = RectF(0f, (height / 2 - progressBarHeight / 2), width.toFloat(), (height / 2 + progressBarHeight / 2))
|
||||
val backgroundRect = RectF(
|
||||
0f,
|
||||
(height / 2 - progressBarHeight / 2),
|
||||
width.toFloat(),
|
||||
(height / 2 + progressBarHeight / 2)
|
||||
)
|
||||
canvas.drawRoundRect(backgroundRect, cornerRadius, cornerRadius, paint)
|
||||
|
||||
|
||||
@ -42,15 +58,28 @@ class CustomProgressBar(context: Context, attrs: AttributeSet?) : View(context,
|
||||
val progressBarWidth = (width * progress / maxProgress)
|
||||
|
||||
// 创建颜色渐变对象
|
||||
val gradient = LinearGradient(0f, 0f, width.toFloat(), 0f, intArrayOf(startColor, middleColor, endColor), null, Shader.TileMode.CLAMP)
|
||||
val gradient = LinearGradient(
|
||||
0f,
|
||||
0f,
|
||||
width.toFloat(),
|
||||
0f,
|
||||
intArrayOf(startColor, middleColor, endColor),
|
||||
null,
|
||||
Shader.TileMode.CLAMP
|
||||
)
|
||||
paintTow.shader = gradient
|
||||
|
||||
// 绘制带圆角的进度条矩形
|
||||
val rect = RectF(0f, (height / 2 - progressBarHeight / 2), progressBarWidth.toFloat(), (height / 2 + progressBarHeight / 2))
|
||||
val rect = RectF(
|
||||
0f,
|
||||
(height / 2 - progressBarHeight / 2),
|
||||
progressBarWidth.toFloat(),
|
||||
(height / 2 + progressBarHeight / 2)
|
||||
)
|
||||
canvas.drawRoundRect(rect, cornerRadius, cornerRadius, paintTow)
|
||||
}
|
||||
|
||||
fun getProgress():Float{
|
||||
fun getProgress(): Float {
|
||||
return progress
|
||||
}
|
||||
|
||||
|
||||
@ -1,16 +1,7 @@
|
||||
package com.tool.minimalistwallpaper.tools;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.MaxAdListener;
|
||||
import com.applovin.mediation.MaxError;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.tool.minimalistwallpaper.MinimalistWPSkin;
|
||||
import com.tool.minimalistwallpaper.data.Mydata;
|
||||
import com.tool.minimalistwallpaper.data.Otherdata;
|
||||
@ -23,7 +14,6 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
@ -32,78 +22,6 @@ public class Mytools {
|
||||
private static ExecutorService executorService;
|
||||
|
||||
|
||||
private static ArrayList<MaxInterstitialAd> adArrayList;
|
||||
private static final String one_AD = "2377d38d18e72a02";
|
||||
private static final String two_Ad = "cebc382a642385a6";
|
||||
private static final String three_ad = "f4f1f8de8666c541";
|
||||
|
||||
public static void setCallBcak(MaxInterstitialAd ad, Adcallback adcallback) {
|
||||
ad.setListener(new MaxAdListener() {
|
||||
@Override
|
||||
public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||
adcallback.onAdHidden();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||
Log.e("zzj","-----------onAdLoadFailed------"+maxError);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||
adcallback.onShowFail(maxAd);
|
||||
Log.e("zzj","-----------onAdDisplayFailed------"+maxError);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static MaxInterstitialAd onCache(List<MaxInterstitialAd> list) {
|
||||
Collections.shuffle(list);
|
||||
for (MaxInterstitialAd ad : list) {
|
||||
if (ad.isReady()) {
|
||||
return ad;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<MaxInterstitialAd> getAllAd() {
|
||||
if (adArrayList == null) {
|
||||
adArrayList = new ArrayList<>();
|
||||
adArrayList.add(createAd(one_AD, MinimalistWPSkin.app));
|
||||
adArrayList.add(createAd(two_Ad, MinimalistWPSkin.app));
|
||||
adArrayList.add(createAd(three_ad, MinimalistWPSkin.app));
|
||||
}
|
||||
for (MaxInterstitialAd ad : adArrayList) {
|
||||
if (!ad.isReady()) {
|
||||
ad.loadAd();
|
||||
}
|
||||
}
|
||||
return adArrayList;
|
||||
}
|
||||
|
||||
private static MaxInterstitialAd createAd(String adUnitId, Context context) {
|
||||
MaxInterstitialAd ad = new MaxInterstitialAd(adUnitId, context);
|
||||
return ad;
|
||||
}
|
||||
|
||||
|
||||
public static void runIO(Runnable task) {
|
||||
getExecutorService().execute(task);
|
||||
}
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
package com.tool.minimalistwallpaper.tools;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
|
||||
public interface SetCallback {
|
||||
|
||||
void onAction(int flag);
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
package com.tool.minimalistwallpaper.tools;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.WallpaperManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.tool.minimalistwallpaper.R;
|
||||
import com.tool.minimalistwallpaper.databinding.DialogBinding;
|
||||
|
||||
public class SetDialogFragment extends DialogFragment {
|
||||
|
||||
|
||||
private DialogBinding vb;
|
||||
|
||||
|
||||
private SetCallback callback;
|
||||
|
||||
private String im;
|
||||
|
||||
|
||||
|
||||
public SetDialogFragment( SetCallback stepDialogCallback) {
|
||||
|
||||
callback = stepDialogCallback;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
vb = DialogBinding.inflate(inflater, container, false);
|
||||
init();
|
||||
return vb.getRoot();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
Dialog dialog = getDialog();
|
||||
setCancelable(true);
|
||||
if (dialog != null) {
|
||||
Window window = dialog.getWindow();
|
||||
if (window != null) {
|
||||
window.setBackgroundDrawableResource(R.color.transparent);
|
||||
window.getDecorView().setPadding(0, 0, 0, 0);
|
||||
|
||||
WindowManager.LayoutParams attributes = window.getAttributes();
|
||||
attributes.gravity = Gravity.CENTER;
|
||||
attributes.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
attributes.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
window.setAttributes(attributes);
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
vb.dialogLock.setVisibility(View.VISIBLE);
|
||||
vb.dialogHome.setVisibility(View.VISIBLE);
|
||||
vb.dialogBoth.setVisibility(View.VISIBLE);
|
||||
vb.bothText.setText(getString(R.string.both_text));
|
||||
} else {
|
||||
vb.dialogLock.setVisibility(View.GONE);
|
||||
vb.dialogHome.setVisibility(View.GONE);
|
||||
vb.dialogBoth.setVisibility(View.VISIBLE);
|
||||
vb.bothText.setText(getString(R.string.set_both_text));
|
||||
}
|
||||
vb.dialogLock.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.findViewById(R.id.lock_pg).setVisibility(View.VISIBLE);
|
||||
dialog.findViewById(R.id.lock_text).setVisibility(View.GONE);
|
||||
if(callback!= null){
|
||||
callback.onAction(WallpaperManager.FLAG_LOCK);
|
||||
}
|
||||
}
|
||||
});
|
||||
vb.dialogBoth.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.findViewById(R.id.both_pg).setVisibility(View.VISIBLE);
|
||||
dialog.findViewById(R.id.both_text).setVisibility(View.GONE);
|
||||
if(callback!= null){
|
||||
callback.onAction(-1);
|
||||
}
|
||||
}
|
||||
});
|
||||
vb.dialogHome.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.findViewById(R.id.home_pg).setVisibility(View.VISIBLE);
|
||||
dialog.findViewById(R.id.home_text).setVisibility(View.GONE);
|
||||
if(callback!= null){
|
||||
callback.onAction(WallpaperManager.FLAG_SYSTEM);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void closeDialog(){
|
||||
dismiss();
|
||||
}
|
||||
|
||||
|
||||
public static SetDialogFragment newInstance(SetCallback stepDialogCallback) {
|
||||
|
||||
SetDialogFragment setDialogFragment = new SetDialogFragment( stepDialogCallback);
|
||||
return setDialogFragment;
|
||||
}
|
||||
}
|
||||
7
app/src/main/res/drawable/oval_bg.xml
Normal file
7
app/src/main/res/drawable/oval_bg.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@color/white"/>
|
||||
|
||||
|
||||
</shape>
|
||||
@ -11,9 +11,10 @@
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pre_pg"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="@color/white" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pre_image"
|
||||
@ -22,115 +23,104 @@
|
||||
android:layout_gravity="bottom|center"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/pre_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:layout_height="80dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:padding="16dp">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:id="@+id/pre_downwp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_toStartOf="@id/pre_setwp"
|
||||
android:background="@drawable/oval_bg"
|
||||
android:padding="10dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/pre_downwp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/prew_menu_bg"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pg_donwnload"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_download"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="@drawable/icon_download"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/pre_setwp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/prew_menu_bg"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="10dp"
|
||||
<ProgressBar
|
||||
android:id="@+id/pg_donwnload"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pg_setwallpaper"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/img_setwallpaper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setwallpaper_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/pre_like"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/prew_menu_bg"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="4dp"
|
||||
<ImageView
|
||||
android:id="@+id/img_download"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="@drawable/icon_download"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_like"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="26dp"
|
||||
android:background="@drawable/pre_like_uncheck"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/pre_setwp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/prew_menu_bg"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pg_setwallpaper"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/img_setwallpaper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setwallpaper_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/pre_like"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_toEndOf="@id/pre_setwp"
|
||||
android:background="@drawable/oval_bg"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_like"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/pre_like_uncheck"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@ -1,13 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_web"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/activity_web"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.WebActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/icon_back" />
|
||||
|
||||
<WebView
|
||||
android:id="@+id/web"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@ -1,134 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dialog_bg">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialog_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/dialog_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/dialog_home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:background="@drawable/setting_cons_bg"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/dialog_title">
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/home_pg"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints" />
|
||||
android:background="@drawable/dialog_bg">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_text"
|
||||
android:id="@+id/dialog_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_text"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/dialog_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/dialog_lock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/setting_cons_bg"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/dialog_home">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/lock_pg"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lock_text"
|
||||
android:layout_width="wrap_content"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/dialog_home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lock_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_margin="24dp"
|
||||
android:background="@drawable/setting_cons_bg"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/dialog_title">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/dialog_both"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/setting_cons_bg"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/dialog_lock">
|
||||
<ProgressBar
|
||||
android:id="@+id/home_pg"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/both_pg"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<TextView
|
||||
android:id="@+id/home_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/both_text"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/dialog_lock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/both_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:layout_margin="24dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/setting_cons_bg"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/dialog_home">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/lock_pg"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lock_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lock_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/dialog_both"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/setting_cons_bg"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/dialog_lock">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/both_pg"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/both_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/both_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
@ -5,4 +5,9 @@
|
||||
<color name="gray">#ffaaaaaa</color>
|
||||
<color name="load_bg">#D9D9D9</color>
|
||||
<color name="solid_color">#ABABAB</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="start">#ee782b</color>
|
||||
<color name="center">#ec6226</color>
|
||||
<color name="end">#d6010d</color>
|
||||
|
||||
</resources>
|
||||
@ -20,4 +20,6 @@
|
||||
<string name="home_text">Home Screen</string>
|
||||
<string name="lock_text">Lock Screen</string>
|
||||
<string name="both_text">Both</string>
|
||||
<string name="set_both_text">Home Screen&Lock Screen</string>
|
||||
<string name="load_fail">Loading failed, please check the network and try again</string>
|
||||
</resources>
|
||||
6
keystore.properties
Normal file
6
keystore.properties
Normal file
@ -0,0 +1,6 @@
|
||||
app_name=Minimalist Wallpaper
|
||||
package_name=com.tool.minimalistwallpaper
|
||||
keystoreFile=app/minimalistwallpaper.jks
|
||||
key_alias=minimalistwallpaperkey0
|
||||
key_store_password=minimalistwallpaper
|
||||
key_password=minimalistwallpaper
|
||||
Loading…
Reference in New Issue
Block a user