V1.0.1(2) 接入topon
This commit is contained in:
parent
2154a3cabc
commit
1bfd981927
@ -4,8 +4,8 @@ import java.text.SimpleDateFormat
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
id("org.jetbrains.kotlin.android")
|
id("org.jetbrains.kotlin.android")
|
||||||
// id("com.google.firebase.crashlytics")
|
id("com.google.firebase.crashlytics")
|
||||||
// id("com.google.gms.google-services")
|
id("com.google.gms.google-services")
|
||||||
id("io.objectbox")
|
id("io.objectbox")
|
||||||
}
|
}
|
||||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||||
@ -18,8 +18,8 @@ android {
|
|||||||
applicationId = "com.ar.photo.drawing.paint"
|
applicationId = "com.ar.photo.drawing.paint"
|
||||||
minSdk = 23
|
minSdk = 23
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 1
|
versionCode = 2
|
||||||
versionName = "1.0.0"
|
versionName = "1.0.1"
|
||||||
setProperty(
|
setProperty(
|
||||||
"archivesBaseName",
|
"archivesBaseName",
|
||||||
"AR Drawing_V" + versionName + "(${versionCode})_$timestamp"
|
"AR Drawing_V" + versionName + "(${versionCode})_$timestamp"
|
||||||
@ -71,4 +71,96 @@ dependencies {
|
|||||||
//noinspection GradleDependency
|
//noinspection GradleDependency
|
||||||
implementation("androidx.camera:camera-extensions:${camerax_version}")
|
implementation("androidx.camera:camera-extensions:${camerax_version}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
implementation(platform("com.google.firebase:firebase-bom:33.7.0"))
|
||||||
|
implementation("com.google.firebase:firebase-crashlytics")
|
||||||
|
implementation("com.google.firebase:firebase-analytics")
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------TopOn(Mintegral、Pangle、UnitAds、Digital Turbine(Fyber)、Chartboost&Helium、Ironsource、Liftoff(Vungle)、Inmobi、Start.io、Appnext、Bigo)
|
||||||
|
|
||||||
|
//Anythink (Necessary)
|
||||||
|
implementation("com.anythink.sdk:core-tpn:6.4.07")
|
||||||
|
implementation("com.anythink.sdk:nativead-tpn:6.4.07")
|
||||||
|
implementation("com.anythink.sdk:banner-tpn:6.4.07")
|
||||||
|
implementation("com.anythink.sdk:interstitial-tpn:6.4.07")
|
||||||
|
implementation("com.anythink.sdk:rewardedvideo-tpn:6.4.07")
|
||||||
|
implementation("com.anythink.sdk:splash-tpn:6.4.07")
|
||||||
|
|
||||||
|
//Androidx (Necessary)
|
||||||
|
implementation("androidx.appcompat:appcompat:1.1.0")
|
||||||
|
implementation("androidx.browser:browser:1.4.0")
|
||||||
|
|
||||||
|
//StartApp
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-startapp:6.4.07")
|
||||||
|
implementation("com.startapp:inapp-sdk:5.0.2")
|
||||||
|
|
||||||
|
//Appnext
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-appnext:6.4.07")
|
||||||
|
implementation("com.appnext.sdk:ads:2.7.1.473")
|
||||||
|
implementation("com.appnext.sdk:banners:2.7.1.473")
|
||||||
|
implementation("com.appnext.sdk:native-ads2:2.7.1.473")
|
||||||
|
implementation("com.appnext.sdk:actions:2.4.6.472")
|
||||||
|
implementation("androidx.constraintlayout:constraintlayout:2.0.4")
|
||||||
|
|
||||||
|
//Vungle
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-vungle:6.4.07")
|
||||||
|
implementation("com.vungle:vungle-ads:7.4.0")
|
||||||
|
implementation("com.google.android.gms:play-services-basement:18.1.0")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||||
|
|
||||||
|
//UnityAds
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-unityads:6.4.07")
|
||||||
|
implementation("com.unity3d.ads:unity-ads:4.12.2")
|
||||||
|
|
||||||
|
//Ironsource
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-ironsource:6.4.07")
|
||||||
|
implementation("com.ironsource.sdk:mediationsdk:8.2.1")
|
||||||
|
implementation("com.google.android.gms:play-services-appset:16.0.2")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||||
|
implementation("com.google.android.gms:play-services-basement:18.1.0")
|
||||||
|
|
||||||
|
//Bigo
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-bigo:6.4.07")
|
||||||
|
implementation("com.bigossp:bigo-ads:4.9.0")
|
||||||
|
|
||||||
|
//Pangle
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-pangle-nonchina:6.4.07")
|
||||||
|
implementation("com.pangle.global:ads-sdk:6.1.0.9")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||||
|
|
||||||
|
//Inmobi
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-inmobi:6.4.07")
|
||||||
|
implementation("com.inmobi.monetization:inmobi-ads-kotlin:10.7.5")
|
||||||
|
|
||||||
|
//Mintegral
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-mintegral-nonchina:6.4.07")
|
||||||
|
implementation("com.mbridge.msdk.oversea:reward:16.8.11")
|
||||||
|
implementation("com.mbridge.msdk.oversea:newinterstitial:16.8.11")
|
||||||
|
implementation("com.mbridge.msdk.oversea:mbnative:16.8.11")
|
||||||
|
implementation("com.mbridge.msdk.oversea:mbnativeadvanced:16.8.11")
|
||||||
|
implementation("com.mbridge.msdk.oversea:mbsplash:16.8.11")
|
||||||
|
implementation("com.mbridge.msdk.oversea:mbbanner:16.8.11")
|
||||||
|
implementation("com.mbridge.msdk.oversea:mbbid:16.8.11")
|
||||||
|
implementation("androidx.recyclerview:recyclerview:1.1.0")
|
||||||
|
|
||||||
|
//Chartboost
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-chartboost:6.4.07")
|
||||||
|
implementation("com.chartboost:chartboost-sdk:9.7.0")
|
||||||
|
implementation("com.chartboost:chartboost-mediation-sdk:4.9.1")
|
||||||
|
implementation("com.chartboost:chartboost-mediation-adapter-chartboost:4.9.7.0.0")
|
||||||
|
implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0")
|
||||||
|
implementation("com.squareup.okhttp3:logging-interceptor:4.10.0")
|
||||||
|
implementation("com.squareup.okhttp3:okhttp:4.10.0")
|
||||||
|
implementation("com.squareup.retrofit2:converter-scalars:2.9.0")
|
||||||
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
|
||||||
|
|
||||||
|
//Fyber
|
||||||
|
implementation("com.anythink.sdk:adapter-tpn-fyber:6.4.07")
|
||||||
|
implementation("com.fyber:marketplace-sdk:8.3.0")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||||
|
|
||||||
}
|
}
|
||||||
29
app/google-services.json
Normal file
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "722562825721",
|
||||||
|
"project_id": "ar-drawing-c03ea",
|
||||||
|
"storage_bucket": "ar-drawing-c03ea.firebasestorage.app"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:722562825721:android:f1f8d0bf6291282dc3d128",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.ar.photo.drawing.paint"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyA554ab9PRRW1ss5BhtiFBYDxFXUdApOok"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
128
app/proguard-rules.pro
vendored
128
app/proguard-rules.pro
vendored
@ -20,3 +20,131 @@
|
|||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
|
|
||||||
|
#---------------------------------------------Topon
|
||||||
|
-keep class com.startapp.** {
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep class com.truenet.** {
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepattributes Exceptions, InnerClasses, Signature, Deprecated, SourceFile,
|
||||||
|
LineNumberTable, *Annotation*, EnclosingMethod
|
||||||
|
-dontwarn android.webkit.JavascriptInterface
|
||||||
|
-dontwarn com.startapp.**
|
||||||
|
|
||||||
|
-dontwarn org.jetbrains.annotations.**
|
||||||
|
-keep class com.appnext.** { *; }
|
||||||
|
-dontwarn com.appnext.**
|
||||||
|
# Vungle
|
||||||
|
-dontwarn com.vungle.ads.**
|
||||||
|
-keepclassmembers class com.vungle.ads.** {
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-keep class com.vungle.ads.**
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Google
|
||||||
|
-keep class com.google.android.gms.** { *; }
|
||||||
|
-dontwarn com.google.android.gms.**
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# START OkHttp + Okio
|
||||||
|
# JSR 305 annotations are for embedding nullability information.
|
||||||
|
-dontwarn javax.annotation.**
|
||||||
|
|
||||||
|
|
||||||
|
# A resource is loaded with a relative path so the package of this class must be preserved.
|
||||||
|
-adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz
|
||||||
|
|
||||||
|
|
||||||
|
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||||
|
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||||
|
|
||||||
|
|
||||||
|
# OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
|
||||||
|
-dontwarn okhttp3.internal.platform.**
|
||||||
|
-dontwarn org.conscrypt.**
|
||||||
|
-dontwarn org.bouncycastle.**
|
||||||
|
-dontwarn org.openjsse.**
|
||||||
|
|
||||||
|
|
||||||
|
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||||
|
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||||
|
|
||||||
|
|
||||||
|
# END OkHttp + Okio
|
||||||
|
|
||||||
|
|
||||||
|
# START Protobuf
|
||||||
|
-dontwarn com.google.protobuf.**
|
||||||
|
-keepclassmembers class com.google.protobuf.** {
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
|
||||||
|
|
||||||
|
|
||||||
|
# END Protobuf
|
||||||
|
-keepclassmembers class com.ironsource.sdk.controller.IronSourceWebView$JSInterface {
|
||||||
|
public *;
|
||||||
|
}
|
||||||
|
-keepclassmembers class * implements android.os.Parcelable {
|
||||||
|
public static final android.os.Parcelable$Creator *;
|
||||||
|
}
|
||||||
|
-keep public class com.google.android.gms.ads.** {
|
||||||
|
public *;
|
||||||
|
}
|
||||||
|
-keep class com.ironsource.adapters.** { *;
|
||||||
|
}
|
||||||
|
-dontwarn com.ironsource.mediationsdk.**
|
||||||
|
-dontwarn com.ironsource.adapters.**
|
||||||
|
-keepattributes JavascriptInterface
|
||||||
|
-keepclassmembers class * {
|
||||||
|
@android.webkit.JavascriptInterface <methods>;
|
||||||
|
}
|
||||||
|
-keep class com.bytedance.sdk.** { *; }
|
||||||
|
-keep class com.inmobi.** { *; }
|
||||||
|
-keep public class com.google.android.gms.**
|
||||||
|
-dontwarn com.google.android.gms.**
|
||||||
|
-dontwarn com.squareup.picasso.**
|
||||||
|
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient{
|
||||||
|
public *;
|
||||||
|
}
|
||||||
|
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info{
|
||||||
|
public *;
|
||||||
|
}
|
||||||
|
# skip the Picasso library classes
|
||||||
|
-keep class com.squareup.picasso.** {*;}
|
||||||
|
-dontwarn com.squareup.okhttp.**
|
||||||
|
# skip Moat classes
|
||||||
|
-keep class com.moat.** {*;}
|
||||||
|
-dontwarn com.moat.**
|
||||||
|
# skip IAB classes
|
||||||
|
-keep class com.iab.** {*;}
|
||||||
|
-dontwarn com.iab.**
|
||||||
|
-keepattributes Signature
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
-keep class com.mbridge.** {*; }
|
||||||
|
-keep interface com.mbridge.** {*; }
|
||||||
|
-keep class android.support.v4.** { *; }
|
||||||
|
-dontwarn com.mbridge.**
|
||||||
|
-keep class **.R$* { public static final int mbridge*; }
|
||||||
|
-keep public class com.mbridge.* extends androidx.** { *; }
|
||||||
|
-keep public class androidx.viewpager.widget.PagerAdapter{ *; }
|
||||||
|
-keep public class androidx.viewpager.widget.ViewPager.OnPageChangeListener{ *; }
|
||||||
|
-keep interface androidx.annotation.IntDef{ *; }
|
||||||
|
-keep interface androidx.annotation.Nullable{ *; }
|
||||||
|
-keep interface androidx.annotation.CheckResult{ *; }
|
||||||
|
-keep interface androidx.annotation.NonNull{ *; }
|
||||||
|
-keep public class androidx.fragment.app.Fragment{ *; }
|
||||||
|
-keep public class androidx.core.content.FileProvider{ *; }
|
||||||
|
-keep public class androidx.core.app.NotificationCompat{ *; }
|
||||||
|
-keep public class androidx.appcompat.widget.AppCompatImageView { *; }
|
||||||
|
-keep public class androidx.recyclerview.*{ *; }
|
||||||
|
-keep class com.chartboost.** { *; }
|
||||||
|
|
||||||
|
#---------------------------------------------Topon
|
||||||
@ -4,6 +4,9 @@ import android.app.Application;
|
|||||||
import android.content.res.AssetManager;
|
import android.content.res.AssetManager;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
|
|
||||||
|
import com.anythink.core.api.ATSDK;
|
||||||
|
import com.anythink.core.api.NetTrafficeCallback;
|
||||||
|
import com.ar.drawing.ad.AdManager;
|
||||||
import com.ar.drawing.db.MyDb;
|
import com.ar.drawing.db.MyDb;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -20,9 +23,6 @@ public class MyDraw extends Application {
|
|||||||
|
|
||||||
public static MyDraw app;
|
public static MyDraw app;
|
||||||
|
|
||||||
// private String APPId ="h67505d35951dc";
|
|
||||||
//
|
|
||||||
// private String AppKey ="a81d17e5cc10cd96a65fe75c0ffd15334";
|
|
||||||
|
|
||||||
public static Typeface defaultFont;
|
public static Typeface defaultFont;
|
||||||
|
|
||||||
@ -32,30 +32,33 @@ public class MyDraw extends Application {
|
|||||||
app = this;
|
app = this;
|
||||||
AssetManager assets = getAssets();
|
AssetManager assets = getAssets();
|
||||||
defaultFont = Typeface.createFromAsset(assets, "font.ttf");
|
defaultFont = Typeface.createFromAsset(assets, "font.ttf");
|
||||||
|
initSDk();
|
||||||
MyDb.init(this);
|
MyDb.init(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void initSDk(){
|
private void initSDk() {
|
||||||
// ATSDK.checkIsEuTraffic(this, new NetTrafficeCallback() {
|
String APPId = "h67ad909a5e11c";
|
||||||
//
|
|
||||||
// @Override
|
String AppKey = "a9a5019e8c78dfe682dfefb31a49e74c3";
|
||||||
// public void onResultCallback(boolean isEU) {
|
ATSDK.checkIsEuTraffic(this, new NetTrafficeCallback() {
|
||||||
// if (isEU && ATSDK.getGDPRDataLevel(MyApplication.this) == ATSDK.UNKNOWN) {
|
|
||||||
// ATSDK.showGdprAuth(MyApplication.this);
|
@Override
|
||||||
// }
|
public void onResultCallback(boolean isEU) {
|
||||||
//
|
if (isEU && ATSDK.getGDPRDataLevel(MyDraw.this) == ATSDK.UNKNOWN) {
|
||||||
// }
|
ATSDK.showGdprAuth(MyDraw.this);
|
||||||
//
|
}
|
||||||
// @Override
|
|
||||||
// public void onErrorCallback(String errorMsg) {
|
}
|
||||||
//
|
|
||||||
// }
|
@Override
|
||||||
// });
|
public void onErrorCallback(String errorMsg) {
|
||||||
// ATSDK.init( this, APPId, AppKey);
|
|
||||||
// ;
|
}
|
||||||
// }
|
});
|
||||||
|
ATSDK.init(this, APPId, AppKey);
|
||||||
|
AdManager.loadAllAd();
|
||||||
|
}
|
||||||
|
|
||||||
public static String Class_Animals = "Animals";
|
public static String Class_Animals = "Animals";
|
||||||
public static String Class_birds = "Birds";
|
public static String Class_birds = "Birds";
|
||||||
|
|||||||
10
app/src/main/java/com/ar/drawing/ad/AdListener.java
Normal file
10
app/src/main/java/com/ar/drawing/ad/AdListener.java
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package com.ar.drawing.ad;
|
||||||
|
|
||||||
|
public interface AdListener {
|
||||||
|
void loadFail(String placeId);
|
||||||
|
void showSuccess();
|
||||||
|
|
||||||
|
void showFail();
|
||||||
|
|
||||||
|
void showClose();
|
||||||
|
}
|
||||||
250
app/src/main/java/com/ar/drawing/ad/AdManager.java
Normal file
250
app/src/main/java/com/ar/drawing/ad/AdManager.java
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
package com.ar.drawing.ad;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.os.CountDownTimer;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.anythink.core.api.ATAdInfo;
|
||||||
|
import com.anythink.core.api.AdError;
|
||||||
|
import com.anythink.interstitial.api.ATInterstitial;
|
||||||
|
import com.anythink.interstitial.api.ATInterstitialListener;
|
||||||
|
import com.ar.drawing.MyDraw;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AdManager {
|
||||||
|
|
||||||
|
private static final int type_no_cache = 0;
|
||||||
|
private static final int type_has_cache = 1;
|
||||||
|
private static final int type_show_success = 2;
|
||||||
|
private static final int type_show_close = 3;
|
||||||
|
private static final int type_show_fail = 4;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* INST_3
|
||||||
|
* n67ad90b508386
|
||||||
|
* INST_2
|
||||||
|
* n67ad90b4bc23d
|
||||||
|
* INST_1
|
||||||
|
* n67ad90b457980
|
||||||
|
*/
|
||||||
|
private static final String place1Id = "n67ad90b508386";
|
||||||
|
private static final String place2Id = "n67ad90b4bc23d";
|
||||||
|
private static final String place3Id = "n67ad90b457980";
|
||||||
|
|
||||||
|
|
||||||
|
private static boolean place1LoadFail = false;
|
||||||
|
private static boolean place2LoadFail = false;
|
||||||
|
private static boolean place3LoadFail = false;
|
||||||
|
|
||||||
|
private static boolean alreadyShow = false;
|
||||||
|
|
||||||
|
private static List<ATInterstitial> list = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
public static void loadAllAd() {
|
||||||
|
if (list.size() == 0) {
|
||||||
|
ATInterstitial mInterstitialAd1 = new ATInterstitial(MyDraw.app, place1Id);
|
||||||
|
ATInterstitial mInterstitialAd2 = new ATInterstitial(MyDraw.app, place2Id);
|
||||||
|
ATInterstitial mInterstitialAd3 = new ATInterstitial(MyDraw.app, place3Id);
|
||||||
|
list.add(mInterstitialAd1);
|
||||||
|
list.add(mInterstitialAd2);
|
||||||
|
list.add(mInterstitialAd3);
|
||||||
|
}
|
||||||
|
for (ATInterstitial ad : list) {
|
||||||
|
if (!ad.isAdReady()) {
|
||||||
|
setCallBack(ad, new AdListener() {
|
||||||
|
@Override
|
||||||
|
public void loadFail(@NonNull String placeId) {
|
||||||
|
if (placeId.equals(place1Id)) {
|
||||||
|
place1LoadFail = true;
|
||||||
|
}
|
||||||
|
if (placeId.equals(place2Id)) {
|
||||||
|
place2LoadFail = true;
|
||||||
|
}
|
||||||
|
if (placeId.equals(place3Id)) {
|
||||||
|
place3LoadFail = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showSuccess() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showFail() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showClose() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ad.load();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ATInterstitial getReadyAd() {
|
||||||
|
Collections.shuffle(list);
|
||||||
|
for (ATInterstitial ad : list) {
|
||||||
|
if (ad.isAdReady()) {
|
||||||
|
Log.d(MyDraw.TAG, "-has Cache------------");
|
||||||
|
return ad;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Log.d(MyDraw.TAG, "-No Cache------------");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setCallBack(ATInterstitial ad, AdListener listener) {
|
||||||
|
ad.setAdListener(new ATInterstitialListener() {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInterstitialAdLoaded() {
|
||||||
|
Log.d(MyDraw.TAG, "LoadLoaded " + ad.mPlacementId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInterstitialAdLoadFail(AdError adError) {
|
||||||
|
listener.loadFail(ad.mPlacementId);
|
||||||
|
Log.d(MyDraw.TAG, "LoadFail:--" + ad.mPlacementId + "--" + adError.getCode() + "---" + adError.getDesc());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInterstitialAdClicked(ATAdInfo atAdInfo) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInterstitialAdShow(ATAdInfo atAdInfo) {
|
||||||
|
Log.d(MyDraw.TAG, "AdShow " + ad.mPlacementId);
|
||||||
|
listener.showSuccess();
|
||||||
|
ad.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInterstitialAdClose(ATAdInfo atAdInfo) {
|
||||||
|
listener.showClose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInterstitialAdVideoStart(ATAdInfo atAdInfo) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInterstitialAdVideoEnd(ATAdInfo atAdInfo) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInterstitialAdVideoError(AdError adError) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static CountDownTimer showWelcomeAd(
|
||||||
|
Activity activity,
|
||||||
|
Long totalTim,
|
||||||
|
CountAction countAction,
|
||||||
|
GoMainAction goMain
|
||||||
|
) {
|
||||||
|
Log.d(MyDraw.TAG, "----------alreadyShow=" + alreadyShow);
|
||||||
|
alreadyShow = false;
|
||||||
|
CountDownTimer timer = new CountDownTimer(totalTim, 100) {
|
||||||
|
@Override
|
||||||
|
public void onTick(long millisUntilFinished) {
|
||||||
|
countAction.onCount(millisUntilFinished);
|
||||||
|
if (!alreadyShow) {
|
||||||
|
showAD(activity, new AdStatusAction() {
|
||||||
|
@Override
|
||||||
|
public void onStatus(int adType) {
|
||||||
|
if (adType == type_has_cache) {
|
||||||
|
alreadyShow = true;
|
||||||
|
}
|
||||||
|
if (adType == type_show_close || adType == type_show_fail) {
|
||||||
|
goMain.onGo();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinish() {
|
||||||
|
if (!alreadyShow) {
|
||||||
|
showTopOn(activity, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
|
goMain.onGo();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void showAD(Activity activity, AdStatusAction action) {
|
||||||
|
ATInterstitial readyAd = getReadyAd();
|
||||||
|
if (readyAd != null) {
|
||||||
|
action.onStatus(type_has_cache);
|
||||||
|
setCallBack(readyAd, new AdListener() {
|
||||||
|
@Override
|
||||||
|
public void loadFail(@NonNull String placeId) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showSuccess() {
|
||||||
|
action.onStatus(type_show_success);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showFail() {
|
||||||
|
action.onStatus(type_show_fail);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showClose() {
|
||||||
|
action.onStatus(type_show_close);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
readyAd.show(activity);
|
||||||
|
} else {
|
||||||
|
action.onStatus(type_no_cache);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void showTopOn(Activity activity, onActionListener listener) {
|
||||||
|
showAD(activity, new AdStatusAction() {
|
||||||
|
@Override
|
||||||
|
public void onStatus(int adType) {
|
||||||
|
if (adType == type_no_cache || adType == type_show_close || adType == type_show_fail) {
|
||||||
|
listener.onAction();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
5
app/src/main/java/com/ar/drawing/ad/AdStatusAction.java
Normal file
5
app/src/main/java/com/ar/drawing/ad/AdStatusAction.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package com.ar.drawing.ad;
|
||||||
|
|
||||||
|
public interface AdStatusAction {
|
||||||
|
void onStatus(int adType);
|
||||||
|
}
|
||||||
5
app/src/main/java/com/ar/drawing/ad/CountAction.java
Normal file
5
app/src/main/java/com/ar/drawing/ad/CountAction.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package com.ar.drawing.ad;
|
||||||
|
|
||||||
|
public interface CountAction {
|
||||||
|
void onCount(long millisUntilFinished);
|
||||||
|
}
|
||||||
5
app/src/main/java/com/ar/drawing/ad/GoMainAction.java
Normal file
5
app/src/main/java/com/ar/drawing/ad/GoMainAction.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package com.ar.drawing.ad;
|
||||||
|
|
||||||
|
public interface GoMainAction {
|
||||||
|
void onGo();
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
package com.ar.drawing.ad;
|
||||||
|
|
||||||
|
public interface onActionListener {
|
||||||
|
|
||||||
|
void onAction();
|
||||||
|
}
|
||||||
@ -18,6 +18,8 @@ import androidx.viewpager2.adapter.FragmentStateAdapter;
|
|||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
|
|
||||||
import com.ar.drawing.R;
|
import com.ar.drawing.R;
|
||||||
|
import com.ar.drawing.ad.AdManager;
|
||||||
|
import com.ar.drawing.ad.onActionListener;
|
||||||
import com.ar.drawing.databinding.ActivityHomeBinding;
|
import com.ar.drawing.databinding.ActivityHomeBinding;
|
||||||
import com.ar.drawing.others.MyUtils;
|
import com.ar.drawing.others.MyUtils;
|
||||||
import com.google.android.material.tabs.TabLayout;
|
import com.google.android.material.tabs.TabLayout;
|
||||||
@ -41,7 +43,7 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
MyUtils.setStatusBarTextColor(this, true);
|
MyUtils.setStatusBarTextColor(this, true);
|
||||||
binding = ActivityHomeBinding.inflate(getLayoutInflater());
|
binding = ActivityHomeBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
// fragmentAlbum = FragmentAlbum.newInstance();
|
AdManager.loadAllAd();
|
||||||
listFragment.add(Home.newInstance());
|
listFragment.add(Home.newInstance());
|
||||||
listFragment.add(Favorite.newInstance());
|
listFragment.add(Favorite.newInstance());
|
||||||
|
|
||||||
@ -127,18 +129,24 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void checkPermission() {
|
public void checkPermission() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
AdManager.showTopOn(HomeActivity.this, new onActionListener() {
|
||||||
permissions = new String[]{Manifest.permission.READ_MEDIA_IMAGES};
|
@Override
|
||||||
} else {
|
public void onAction() {
|
||||||
permissions = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE};
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
}
|
permissions = new String[]{Manifest.permission.READ_MEDIA_IMAGES};
|
||||||
if (!MyUtils.checkPermission(HomeActivity.this, permissions)) {
|
} else {
|
||||||
|
permissions = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE};
|
||||||
|
}
|
||||||
|
if (!MyUtils.checkPermission(HomeActivity.this, permissions)) {
|
||||||
|
|
||||||
ActivityCompat.requestPermissions(HomeActivity.this, permissions, 0);
|
ActivityCompat.requestPermissions(HomeActivity.this, permissions, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
startImport();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
startImport();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startImport() {
|
private void startImport() {
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
|
||||||
import com.ar.drawing.MyDraw;
|
import com.ar.drawing.MyDraw;
|
||||||
|
import com.ar.drawing.ad.AdManager;
|
||||||
|
import com.ar.drawing.ad.onActionListener;
|
||||||
import com.ar.drawing.adapter.ListAdapter;
|
import com.ar.drawing.adapter.ListAdapter;
|
||||||
import com.ar.drawing.databinding.ActivityItemBinding;
|
import com.ar.drawing.databinding.ActivityItemBinding;
|
||||||
import com.ar.drawing.others.MyUtils;
|
import com.ar.drawing.others.MyUtils;
|
||||||
@ -23,14 +25,19 @@ public class ItemActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
AdManager.loadAllAd();
|
||||||
preViewBinding = ActivityItemBinding.inflate(getLayoutInflater());
|
preViewBinding = ActivityItemBinding.inflate(getLayoutInflater());
|
||||||
setContentView(preViewBinding.getRoot());
|
setContentView(preViewBinding.getRoot());
|
||||||
MyUtils.setStatusBarTextColor(this, true);
|
MyUtils.setStatusBarTextColor(this, true);
|
||||||
dirStr = getIntent().getStringExtra(MyDraw.Key_ViewDir);
|
dirStr = getIntent().getStringExtra(MyDraw.Key_ViewDir);
|
||||||
preViewBinding.categoryName.setText(dirStr.substring(dirStr.lastIndexOf("_") + 1));
|
preViewBinding.categoryName.setText(dirStr.substring(dirStr.lastIndexOf("_") + 1));
|
||||||
|
|
||||||
|
AdManager.showTopOn(ItemActivity.this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
onInitList();
|
onInitList();
|
||||||
onInitClick();
|
onInitClick();
|
||||||
@ -49,7 +56,13 @@ public class ItemActivity extends AppCompatActivity {
|
|||||||
preViewBinding.back.setOnClickListener(new View.OnClickListener() {
|
preViewBinding.back.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
finish();
|
AdManager.showTopOn(ItemActivity.this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
|||||||
|
|
||||||
import com.ar.drawing.MyDraw;
|
import com.ar.drawing.MyDraw;
|
||||||
import com.ar.drawing.R;
|
import com.ar.drawing.R;
|
||||||
|
import com.ar.drawing.ad.AdManager;
|
||||||
import com.ar.drawing.adapter.LocalAdapter;
|
import com.ar.drawing.adapter.LocalAdapter;
|
||||||
import com.ar.drawing.databinding.ActivityLocalBinding;
|
import com.ar.drawing.databinding.ActivityLocalBinding;
|
||||||
import com.ar.drawing.db.BeanImport;
|
import com.ar.drawing.db.BeanImport;
|
||||||
@ -42,7 +43,9 @@ public class LocalActivity extends AppCompatActivity {
|
|||||||
MyUtils.setStatusBarTextColor(this,true);
|
MyUtils.setStatusBarTextColor(this,true);
|
||||||
binding = ActivityLocalBinding.inflate(getLayoutInflater());
|
binding = ActivityLocalBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
AdManager.loadAllAd();
|
||||||
onInit();
|
onInit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,8 @@ import androidx.camera.view.PreviewView;
|
|||||||
import androidx.core.app.ActivityCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
|
import com.ar.drawing.ad.AdManager;
|
||||||
|
import com.ar.drawing.ad.onActionListener;
|
||||||
import com.ar.drawing.db.MyDb;
|
import com.ar.drawing.db.MyDb;
|
||||||
import com.ar.drawing.others.MyUtils;
|
import com.ar.drawing.others.MyUtils;
|
||||||
import com.google.common.util.concurrent.ListenableFuture;
|
import com.google.common.util.concurrent.ListenableFuture;
|
||||||
@ -78,7 +80,7 @@ public class PreActivity extends AppCompatActivity implements View.OnTouchListen
|
|||||||
MyUtils.setStatusBarTextColor(this, true);
|
MyUtils.setStatusBarTextColor(this, true);
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
isMain = intent.getBooleanExtra(MyDraw.Key_ISMAIN, false);
|
isMain = intent.getBooleanExtra(MyDraw.Key_ISMAIN, false);
|
||||||
|
AdManager.loadAllAd();
|
||||||
|
|
||||||
previewView = findViewById(R.id.preview);
|
previewView = findViewById(R.id.preview);
|
||||||
imageView = findViewById(R.id.image);
|
imageView = findViewById(R.id.image);
|
||||||
@ -216,8 +218,14 @@ public class PreActivity extends AppCompatActivity implements View.OnTouchListen
|
|||||||
flashIm.setSelected(!selected);
|
flashIm.setSelected(!selected);
|
||||||
camera.getCameraControl().enableTorch(!selected);
|
camera.getCameraControl().enableTorch(!selected);
|
||||||
} else if (v.equals(imPhoto)) {
|
} else if (v.equals(imPhoto)) {
|
||||||
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
AdManager.showTopOn(PreActivity.this, new onActionListener() {
|
||||||
intentActivityResultLauncher.launch(intent);
|
@Override
|
||||||
|
public void onAction() {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||||
|
intentActivityResultLauncher.launch(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
} else if (v.equals(imZoom)) {
|
} else if (v.equals(imZoom)) {
|
||||||
if (seekBar.getVisibility() == View.VISIBLE) {
|
if (seekBar.getVisibility() == View.VISIBLE) {
|
||||||
seekBar.setVisibility(View.GONE);
|
seekBar.setVisibility(View.GONE);
|
||||||
@ -266,6 +274,12 @@ public class PreActivity extends AppCompatActivity implements View.OnTouchListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
|
AdManager.showTopOn(PreActivity.this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA;
|
cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA;
|
||||||
permissions = new String[]{android.Manifest.permission.CAMERA};
|
permissions = new String[]{android.Manifest.permission.CAMERA};
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
|||||||
@ -6,13 +6,16 @@ import android.os.CountDownTimer;
|
|||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.ar.drawing.ad.AdManager;
|
||||||
|
import com.ar.drawing.ad.CountAction;
|
||||||
|
import com.ar.drawing.ad.GoMainAction;
|
||||||
import com.ar.drawing.databinding.ActivityWelBinding;
|
import com.ar.drawing.databinding.ActivityWelBinding;
|
||||||
import com.ar.drawing.others.MyUtils;
|
import com.ar.drawing.others.MyUtils;
|
||||||
|
|
||||||
public class WelActivity extends AppCompatActivity {
|
public class WelActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private ActivityWelBinding binding;
|
private ActivityWelBinding binding;
|
||||||
private long time = 1000;
|
private long time = 11000;
|
||||||
private CountDownTimer countDownTimer;
|
private CountDownTimer countDownTimer;
|
||||||
|
|
||||||
|
|
||||||
@ -22,22 +25,22 @@ public class WelActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
binding = ActivityWelBinding.inflate(getLayoutInflater());
|
binding = ActivityWelBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
AdManager.loadAllAd();
|
||||||
MyUtils.setStatusBarTextColor(this, true);
|
MyUtils.setStatusBarTextColor(this, true);
|
||||||
|
|
||||||
|
countDownTimer = AdManager.showWelcomeAd(WelActivity.this, time, new CountAction() {
|
||||||
countDownTimer= new CountDownTimer(time,100) {
|
|
||||||
@Override
|
@Override
|
||||||
public void onTick(long millisUntilFinished) {
|
public void onCount(long millisUntilFinished) {
|
||||||
int progressPercentage = (int) ((100 * millisUntilFinished) / time);
|
int progressPercentage = (int) ((100 * millisUntilFinished) / time);
|
||||||
int Percentage = 100 - progressPercentage;
|
int Percentage = 100 - progressPercentage;
|
||||||
binding.loadingPb.setProgress(Percentage);
|
binding.loadingPb.setProgress(Percentage);
|
||||||
}
|
}
|
||||||
|
}, new GoMainAction() {
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public void onGo() {
|
||||||
enterMain();
|
enterMain();
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
countDownTimer.start();
|
countDownTimer.start();
|
||||||
}
|
}
|
||||||
private void enterMain() {
|
private void enterMain() {
|
||||||
|
|||||||
@ -6,40 +6,48 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="com.ar.drawing.ui.WelActivity">
|
tools:context="com.ar.drawing.ui.WelActivity">
|
||||||
|
|
||||||
<ImageView
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="126dp"
|
|
||||||
android:layout_height="126dp"
|
|
||||||
android:layout_marginTop="186dp"
|
|
||||||
android:src="@mipmap/im_logo"
|
|
||||||
android:id="@+id/image"
|
android:id="@+id/image"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="186dp"
|
||||||
|
app:cardCornerRadius="15dp"
|
||||||
|
app:cardElevation="0dp"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="126dp"
|
||||||
|
android:layout_height="126dp"
|
||||||
|
android:src="@mipmap/im_logo" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
<com.ar.drawing.others.MyTextView
|
<com.ar.drawing.others.MyTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:textSize="24sp"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toBottomOf="@id/image"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
app:apply_font="true"
|
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:layout_height="wrap_content"/>
|
android:textSize="24sp"
|
||||||
|
app:apply_font="true"
|
||||||
<ProgressBar
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_marginStart="25dp"
|
|
||||||
android:layout_marginEnd="25dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/image" />
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/loading_pb"
|
||||||
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="7dp"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:layout_marginEnd="25dp"
|
||||||
android:layout_marginBottom="60dp"
|
android:layout_marginBottom="60dp"
|
||||||
android:progress="90"
|
android:progress="90"
|
||||||
android:id="@+id/loading_pb"
|
|
||||||
android:progressDrawable="@drawable/welcome_pb"
|
android:progressDrawable="@drawable/welcome_pb"
|
||||||
style="?android:attr/progressBarStyleHorizontal"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_height="7dp"/>
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@ -2,8 +2,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.1.0" apply false
|
id("com.android.application") version "8.1.0" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.8.20" apply false
|
id("org.jetbrains.kotlin.android") version "1.8.20" apply false
|
||||||
// id("com.google.gms.google-services") version "4.3.15" apply false
|
id("com.google.gms.google-services") version "4.3.15" apply false
|
||||||
// id ("com.google.firebase.crashlytics") version "2.9.2" apply false
|
id ("com.google.firebase.crashlytics") version "2.9.2" apply false
|
||||||
}
|
}
|
||||||
buildscript{
|
buildscript{
|
||||||
dependencies{
|
dependencies{
|
||||||
|
|||||||
@ -13,7 +13,24 @@ dependencyResolutionManagement {
|
|||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
|
//Anythink(Core)
|
||||||
|
maven ("https://jfrog.anythinktech.com/artifactory/overseas_sdk")
|
||||||
|
|
||||||
|
//Appnext
|
||||||
|
maven ("https://dl.appnext.com")
|
||||||
|
|
||||||
|
//Ironsource
|
||||||
|
maven ("https://android-sdk.is.com/")
|
||||||
|
|
||||||
|
//Pangle
|
||||||
|
maven ("https://artifact.bytedance.com/repository/pangle")
|
||||||
|
|
||||||
|
//Mintegral
|
||||||
|
maven ("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea")
|
||||||
|
|
||||||
|
//Chartboost
|
||||||
|
maven ("https://cboost.jfrog.io/artifactory/chartboost-ads")
|
||||||
|
maven ("https://cboost.jfrog.io/artifactory/chartboost-mediation")
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user