V1.2(3)
This commit is contained in:
parent
07f1073277
commit
39899e421b
@ -19,8 +19,8 @@ android {
|
||||
applicationId = "com.keyborad.theme.trendyborad"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = 2
|
||||
versionName = "1.1"
|
||||
versionCode = 3
|
||||
versionName = "1.2"
|
||||
setProperty(
|
||||
"archivesBaseName",
|
||||
"TrendyBoard-" + versionName + "(${versionCode})_$timestamp"
|
||||
@ -38,12 +38,12 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
@ -51,84 +51,129 @@ android {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation("androidx.core:core-ktx:1.15.0")
|
||||
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||
implementation("com.google.android.material:material:1.13.0")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
|
||||
implementation("androidx.activity:activity:1.12.1")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.3.0")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0")
|
||||
|
||||
|
||||
implementation("com.squareup.okhttp3:okhttp:5.3.2")
|
||||
implementation("com.github.bumptech.glide:glide:5.0.5")
|
||||
implementation ("jp.wasabeef:glide-transformations:4.3.0")
|
||||
//Glide支持webp动图的库
|
||||
implementation("com.github.zjupure:webpdecoder:2.7.4.16.0")
|
||||
implementation("com.github.omicronapps:7-Zip-JBinding-4Android:Release-16.02-2.03")
|
||||
|
||||
val room_version = "2.8.4"
|
||||
implementation ("androidx.room:room-runtime:$room_version")
|
||||
kapt("androidx.room:room-compiler:$room_version")
|
||||
implementation ("androidx.room:room-ktx:$room_version")
|
||||
implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
|
||||
implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
|
||||
|
||||
implementation("com.google.android.material:material:1.8.0")
|
||||
|
||||
implementation("androidx.viewpager2:viewpager2:1.0.0")
|
||||
implementation("com.github.bumptech.glide:glide:4.12.0")
|
||||
annotationProcessor("com.github.bumptech.glide:compiler:4.12.0")
|
||||
|
||||
|
||||
implementation(files("libs/UpLoadLibrary_12_03_15_13-release.aar"))
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
implementation("com.google.android.gms:play-services-location:21.0.1")
|
||||
implementation("com.google.android.gms:play-services-appset:16.0.1")
|
||||
// Import the Firebase BoM
|
||||
implementation(platform("com.google.firebase:firebase-bom:34.6.0"))
|
||||
implementation("com.google.firebase:firebase-crashlytics-ndk")
|
||||
implementation("com.google.firebase:firebase-analytics")
|
||||
// okhttp
|
||||
implementation ("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
||||
|
||||
// TradPlus
|
||||
implementation("com.tradplusad:tradplus:15.1.10.1")
|
||||
//noinspection GradleCompatible
|
||||
implementation("androidx.legacy:legacy-support-v4:1.0.0")
|
||||
implementation("androidx.appcompat:appcompat:1.3.0-alpha02")
|
||||
// Ironsource
|
||||
implementation("com.ironsource.sdk:mediationsdk:9.0.0")
|
||||
implementation("com.tradplusad:tradplus-ironsource:10.15.1.10.1")
|
||||
// Pangle
|
||||
implementation("com.tradplusad:tradplus-pangle:19.15.1.10.1")
|
||||
implementation("com.pangle.global:pag-sdk:7.7.0.2")
|
||||
// UnityAds
|
||||
implementation("com.tradplusad:tradplus-unity:5.15.1.10.1")
|
||||
implementation("com.unity3d.ads:unity-ads:4.16.3")
|
||||
//optional dependency for better targeting
|
||||
implementation("androidx.browser:browser:1.8.0")
|
||||
implementation("com.squareup.picasso:picasso:2.8")
|
||||
implementation("androidx.viewpager:viewpager:1.0.0")
|
||||
implementation("androidx.recyclerview:recyclerview:1.2.1")
|
||||
// Mintegral
|
||||
implementation("com.tradplusad:tradplus-mintegralx_overseas:18.15.1.10.1")
|
||||
implementation("androidx.recyclerview:recyclerview:1.1.0")
|
||||
implementation("com.mbridge.msdk.oversea:mbridge_android_sdk:16.10.11")
|
||||
// Liftoff
|
||||
implementation("com.tradplusad:tradplus-vunglex:7.15.1.10.1")
|
||||
implementation("com.vungle:vungle-ads:7.6.0")
|
||||
// Cross Promotion
|
||||
implementation("com.tradplusad:tradplus-crosspromotion:27.15.1.10.1")
|
||||
// TP Exchange
|
||||
// 请注意保持与主包版本同步更新
|
||||
implementation("com.google.code.gson:gson:2.8.6")
|
||||
implementation("com.tradplusad:tp_exchange:40.15.1.10.1")
|
||||
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation("androidx.core:core-ktx:1.15.0")
|
||||
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||
implementation("com.google.android.material:material:1.13.0")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
|
||||
implementation("androidx.activity:activity:1.12.1")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.3.0")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0")
|
||||
|
||||
|
||||
implementation("com.squareup.okhttp3:okhttp:5.3.2")
|
||||
implementation("com.github.bumptech.glide:glide:5.0.5")
|
||||
implementation("jp.wasabeef:glide-transformations:4.3.0")
|
||||
//Glide支持webp动图的库
|
||||
implementation("com.github.zjupure:webpdecoder:2.7.4.16.0")
|
||||
implementation("com.github.omicronapps:7-Zip-JBinding-4Android:Release-16.02-2.03")
|
||||
|
||||
val room_version = "2.8.4"
|
||||
implementation("androidx.room:room-runtime:$room_version")
|
||||
kapt("androidx.room:room-compiler:$room_version")
|
||||
implementation("androidx.room:room-ktx:$room_version")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
|
||||
|
||||
implementation("com.google.android.material:material:1.8.0")
|
||||
|
||||
implementation("androidx.viewpager2:viewpager2:1.0.0")
|
||||
implementation("com.github.bumptech.glide:glide:4.12.0")
|
||||
annotationProcessor("com.github.bumptech.glide:compiler:4.12.0")
|
||||
|
||||
|
||||
implementation(files("libs/UpLoadLibrary_12_03_15_13-release.aar"))
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
implementation("com.google.android.gms:play-services-location:21.0.1")
|
||||
implementation("com.google.android.gms:play-services-appset:16.0.1")
|
||||
// Import the Firebase BoM
|
||||
implementation(platform("com.google.firebase:firebase-bom:34.6.0"))
|
||||
implementation("com.google.firebase:firebase-crashlytics-ndk")
|
||||
implementation("com.google.firebase:firebase-analytics")
|
||||
// okhttp
|
||||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
||||
|
||||
|
||||
|
||||
implementation(files("libs/TradPlusLibrary_01_04_12_20-release.aar"))
|
||||
// TradPlus
|
||||
implementation("com.tradplusad:tradplus:15.2.0.1")
|
||||
implementation("androidx.legacy:legacy-support-v4:1.0.0")
|
||||
implementation("androidx.appcompat:appcompat:1.3.0-alpha02")
|
||||
|
||||
// IronSource
|
||||
implementation("com.ironsource.sdk:mediationsdk:9.0.0")
|
||||
implementation("com.tradplusad:tradplus-ironsource:10.15.2.0.1")
|
||||
|
||||
// Pangle
|
||||
implementation("com.tradplusad:tradplus-pangle:19.15.2.0.1")
|
||||
implementation("com.pangle.global:pag-sdk:7.8.0.7")
|
||||
|
||||
// UnityAds
|
||||
implementation("com.tradplusad:tradplus-unity:5.15.2.0.1")
|
||||
implementation("com.unity3d.ads:unity-ads:4.16.3")
|
||||
|
||||
// Chartboost
|
||||
// implementation("com.tradplusad:tradplus-chartboostx:15.15.2.0.1")
|
||||
// implementation("com.chartboost:chartboost-sdk:9.10.0")
|
||||
// implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
|
||||
// implementation("com.google.android.gms:play-services-base:17.4.0")
|
||||
|
||||
|
||||
//上面新版本下载失败用旧版本
|
||||
implementation("com.tradplusad:tradplus-chartboostx:15.14.5.0.1")
|
||||
implementation("com.chartboost:chartboost-sdk:9.8.3")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
|
||||
implementation("com.google.android.gms:play-services-base:17.4.0")
|
||||
|
||||
// InMobi
|
||||
implementation("com.tradplusad:tradplus-inmobix:23.15.2.0.1")
|
||||
implementation("com.inmobi.monetization:inmobi-ads-kotlin:11.0.0")
|
||||
implementation("com.squareup.okhttp3:okhttp:3.14.9")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
|
||||
implementation("androidx.core:core-ktx:1.5.0")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.0")
|
||||
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
implementation("com.google.android.gms:play-services-location:21.0.1") // optional
|
||||
implementation("androidx.browser:browser:1.8.0")
|
||||
implementation("com.squareup.picasso:picasso:2.8")
|
||||
implementation("androidx.viewpager:viewpager:1.0.0")
|
||||
implementation("androidx.recyclerview:recyclerview:1.2.1")
|
||||
|
||||
// Fyber
|
||||
implementation("com.fyber:marketplace-sdk:8.4.0")
|
||||
implementation("com.tradplusad:tradplus-fyber:24.15.2.0.1")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
|
||||
implementation("com.google.android.gms:play-services-base:17.4.0")
|
||||
|
||||
// Mintegral
|
||||
implementation("com.tradplusad:tradplus-mintegralx_overseas:18.15.2.0.1")
|
||||
implementation("androidx.recyclerview:recyclerview:1.1.0")
|
||||
implementation("com.mbridge.msdk.oversea:mbridge_android_sdk:16.10.11")
|
||||
|
||||
// Liftoff (Vungle)
|
||||
implementation("com.tradplusad:tradplus-vunglex:7.15.2.0.1")
|
||||
implementation("com.vungle:vungle-ads:7.6.0")
|
||||
|
||||
// Bigo
|
||||
implementation("com.bigossp:bigo-ads:5.5.2")
|
||||
implementation("com.tradplusad:tradplus-bigo:57.15.2.0.1")
|
||||
|
||||
// Cross Promotion
|
||||
implementation("com.tradplusad:tradplus-crosspromotion:27.15.2.0.1")
|
||||
|
||||
// TP Exchange(注意与主包版本同步)
|
||||
implementation("com.google.code.gson:gson:2.8.6")
|
||||
implementation("com.tradplusad:tp_exchange:40.15.2.0.1")
|
||||
|
||||
// Google UMP
|
||||
implementation ("com.google.android.ump:user-messaging-platform:3.2.0")
|
||||
}
|
||||
}
|
||||
BIN
app/libs/TradPlusLibrary_01_04_12_20-release.aar
Normal file
BIN
app/libs/TradPlusLibrary_01_04_12_20-release.aar
Normal file
Binary file not shown.
@ -33,7 +33,7 @@ class TrendyApp : Application() {
|
||||
dealFile()
|
||||
|
||||
init(this, "ocean") { s: String?, s2: String? -> null }
|
||||
TradPlusSdk.initSdk(this, "820EA2E07D9C3C4D0DD816EB220F2711")
|
||||
|
||||
}
|
||||
private fun dealFile() {
|
||||
val openFile = trendyAppInstance.assets.open("new_res.json")
|
||||
|
||||
@ -1,94 +0,0 @@
|
||||
package com.keyborad.theme.trendyborad.ad
|
||||
|
||||
import android.app.Activity
|
||||
import android.util.Log
|
||||
import com.tradplus.ads.base.bean.TPAdError
|
||||
import com.tradplus.ads.base.bean.TPAdInfo
|
||||
import com.tradplus.ads.open.interstitial.InterstitialAdListener
|
||||
import com.tradplus.ads.open.interstitial.TPInterstitial
|
||||
|
||||
class AdInstLoad {
|
||||
private var mPlace: String
|
||||
private var adLoadListener: LoadListener? = null
|
||||
private var activity: Activity? = null
|
||||
|
||||
constructor(activity: Activity, place: String, listener: LoadListener?) {
|
||||
this.mPlace = place
|
||||
this.adLoadListener = listener
|
||||
this.activity = activity
|
||||
init()
|
||||
}
|
||||
|
||||
constructor(place: String, listener: LoadListener?) {
|
||||
this.mPlace = place
|
||||
this.adLoadListener = listener
|
||||
init()
|
||||
}
|
||||
|
||||
private fun init() {
|
||||
val interstitialAd = InstAdCacheManager.Companion.instance.getAdCache(mPlace)
|
||||
if (interstitialAd != null && interstitialAd.isReady) {
|
||||
Log.d("ocean", "$mPlace 有缓存不进行load")
|
||||
adLoadListener?.loadFailed("有缓存不进行load")
|
||||
return
|
||||
}
|
||||
|
||||
val tpInterstitial = TPInterstitial(activity, mPlace)
|
||||
tpInterstitial.setAdListener(object : InterstitialAdListener {
|
||||
//广告加载完成 首个广告源加载成功时回调 一次加载流程只会回调一次
|
||||
override fun onAdLoaded(tpAdInfo: TPAdInfo?) {
|
||||
if (tpAdInfo != null) {
|
||||
Log.d("ocean", "$mPlace 广告load成功,tpAdInfo有值")
|
||||
InstAdCacheManager.Companion.instance.setAdCache(mPlace, tpInterstitial)
|
||||
adLoadListener?.loaded(tpAdInfo)
|
||||
} else {
|
||||
adLoadListener?.loadFailed("tpAdInfo没有值")
|
||||
Log.d("ocean", "$mPlace tpAdInfo没有值")
|
||||
}
|
||||
}
|
||||
|
||||
// 广告被点击
|
||||
override fun onAdClicked(tpAdInfo: TPAdInfo?) {
|
||||
Log.d("ocean", "$mPlace tradplus onAdClicked")
|
||||
}
|
||||
|
||||
// 广告成功展示在页面上
|
||||
override fun onAdImpression(tpAdInfo: TPAdInfo?) {
|
||||
Log.d("ocean", "$mPlace tradplus onAdImpression")
|
||||
}
|
||||
|
||||
// 广告加载失败
|
||||
override fun onAdFailed(error: TPAdError?) {
|
||||
adLoadListener?.loadFailed("code->${error?.errorCode}message->${error?.errorMsg}")
|
||||
Log.d(
|
||||
"ocean",
|
||||
"$mPlace load ad onError->code->${error?.errorCode}message->${error?.errorMsg}"
|
||||
)
|
||||
}
|
||||
|
||||
// 广告被关闭
|
||||
override fun onAdClosed(tpAdInfo: TPAdInfo?) {
|
||||
Log.d("ocean", "$mPlace tradplus onAdClosed")
|
||||
}
|
||||
|
||||
// 视频播放开始(部分广告源支持)
|
||||
override fun onAdVideoStart(tpAdInfo: TPAdInfo?) {
|
||||
Log.d("ocean", "$mPlace tradplus onAdVideoStart")
|
||||
}
|
||||
|
||||
//视频播放结束(部分广告源支持)
|
||||
override fun onAdVideoEnd(tpAdInfo: TPAdInfo?) {
|
||||
Log.d("ocean", "$mPlace tradplus onAdVideoEnd")
|
||||
}
|
||||
|
||||
//视频播放失败(部分广告源支持)
|
||||
override fun onAdVideoError(tpAdInfo: TPAdInfo?, error: TPAdError?) {
|
||||
Log.d(
|
||||
"ocean",
|
||||
"$mPlace onAdVideoError code->${error?.errorCode}message->${error?.errorMsg}"
|
||||
)
|
||||
}
|
||||
})
|
||||
tpInterstitial.loadAd()
|
||||
}
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
package com.keyborad.theme.trendyborad.ad
|
||||
|
||||
import android.app.Activity
|
||||
import android.util.Log
|
||||
import com.tradplus.ads.base.bean.TPAdError
|
||||
import com.tradplus.ads.base.bean.TPAdInfo
|
||||
import com.tradplus.ads.open.interstitial.InterstitialAdListener
|
||||
|
||||
class AdInstShower {
|
||||
private var mPlace: String
|
||||
private var showListener: ShowListener? = null
|
||||
private var activity: Activity? = null
|
||||
|
||||
constructor(activity: Activity, place: String, showListener: ShowListener?) {
|
||||
this.mPlace = place
|
||||
this.showListener = showListener
|
||||
this.activity = activity
|
||||
init()
|
||||
}
|
||||
|
||||
constructor(place: String, showListener: ShowListener?) {
|
||||
this.mPlace = place
|
||||
this.showListener = showListener
|
||||
init()
|
||||
}
|
||||
|
||||
private fun init() {
|
||||
val interstitialAd = InstAdCacheManager.Companion.instance.getAdCache(mPlace)
|
||||
interstitialAd?.setAdListener(object : InterstitialAdListener {
|
||||
//广告加载完成 首个广告源加载成功时回调 一次加载流程只会回调一次
|
||||
override fun onAdLoaded(tpAdInfo: TPAdInfo?) {}
|
||||
|
||||
// 广告被点击
|
||||
override fun onAdClicked(tpAdInfo: TPAdInfo?) {
|
||||
showListener?.onAdClicked()
|
||||
Log.d("ocean", "AdInstShower 广告点击回调")
|
||||
}
|
||||
|
||||
// 广告成功展示在页面上
|
||||
override fun onAdImpression(tpAdInfo: TPAdInfo?) {
|
||||
showListener?.onAdShown(tpAdInfo)
|
||||
Log.d("ocean", "AdInstShower 广告展示回调")
|
||||
}
|
||||
|
||||
// 广告加载失败
|
||||
override fun onAdFailed(error: TPAdError?) {}
|
||||
|
||||
// 广告被关闭
|
||||
override fun onAdClosed(tpAdInfo: TPAdInfo?) {
|
||||
showListener?.onAdClosed()
|
||||
Log.d("ocean", "AdInstShower 广告关闭回调")
|
||||
}
|
||||
|
||||
// 视频播放开始(部分广告源支持)
|
||||
override fun onAdVideoStart(tpAdInfo: TPAdInfo?) {}
|
||||
|
||||
//视频播放结束(部分广告源支持)
|
||||
override fun onAdVideoEnd(tpAdInfo: TPAdInfo?) {}
|
||||
|
||||
//视频播放失败(部分广告源支持)
|
||||
override fun onAdVideoError(tpAdInfo: TPAdInfo?, error: TPAdError?) {
|
||||
Log.d("ocean", "AdInstShower 视频广告播放失败回调->${error}")
|
||||
showListener?.onAdShowFailed(AdShowFailed(error?.errorMsg.toString()))
|
||||
}
|
||||
})
|
||||
interstitialAd?.showAd(activity!!, mPlace)
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
package com.keyborad.theme.trendyborad.ad
|
||||
|
||||
data class AdShowFailed(
|
||||
val msg: String = "",
|
||||
)
|
||||
@ -1,28 +0,0 @@
|
||||
package com.keyborad.theme.trendyborad.ad
|
||||
|
||||
import android.app.Activity
|
||||
|
||||
object AdsInsUtil {
|
||||
|
||||
object Placement {
|
||||
const val TOP_ON_AD_ONE = "15DEDAAB580016A6FEA0F5A5DF85E712"
|
||||
const val TOP_ON_AD_TOW = "739DD8E223572D6D65CC4EC1DE1CDC12"
|
||||
const val TOP_ON_AD_THREE = "0D27FE8F7CB7A19D82235897A01DF112"
|
||||
}
|
||||
|
||||
fun loadAd(
|
||||
act: Activity,
|
||||
adID: String,
|
||||
loadListener: LoadListener?
|
||||
): AdInstLoad {
|
||||
return AdInstLoad(act, adID, loadListener)
|
||||
}
|
||||
|
||||
fun showAd(
|
||||
act: Activity,
|
||||
adID: String,
|
||||
listener: ShowListener
|
||||
): AdInstShower {
|
||||
return AdInstShower(act, adID, listener)
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
package com.keyborad.theme.trendyborad.ad
|
||||
|
||||
import com.tradplus.ads.open.interstitial.TPInterstitial
|
||||
|
||||
class InstAdCacheManager {
|
||||
private val mAdCacheDict: MutableMap<String, TPInterstitial> = mutableMapOf()
|
||||
|
||||
companion object {
|
||||
val instance: InstAdCacheManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
InstAdCacheManager()
|
||||
}
|
||||
}
|
||||
|
||||
fun setAdCache(place: String, adCache: TPInterstitial) {
|
||||
mAdCacheDict[place] = adCache
|
||||
}
|
||||
|
||||
fun getAdCache(place: String): TPInterstitial? {
|
||||
return mAdCacheDict[place]
|
||||
}
|
||||
|
||||
fun getLoadedInstCount(): Int {
|
||||
var count = 0
|
||||
try {
|
||||
mAdCacheDict.forEach { (key, value) ->
|
||||
if (value.isReady) {
|
||||
count += 1
|
||||
}
|
||||
}
|
||||
} catch (_: Exception) {
|
||||
|
||||
}
|
||||
return count
|
||||
}
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
package com.keyborad.theme.trendyborad.ad
|
||||
|
||||
import com.tradplus.ads.base.bean.TPAdInfo
|
||||
|
||||
interface LoadListener {
|
||||
fun loadFailed(error: String) {}
|
||||
fun loaded(ad: TPAdInfo) {}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
package com.keyborad.theme.trendyborad.ad
|
||||
|
||||
import com.tradplus.ads.base.bean.TPAdInfo
|
||||
|
||||
interface ShowListener {
|
||||
fun onAdShown(ad: TPAdInfo?) {}
|
||||
fun onAdShowFailed(error: AdShowFailed?) {}
|
||||
fun onAdClosed() {}
|
||||
fun onAdClicked() {}
|
||||
}
|
||||
@ -170,7 +170,15 @@ public class TrendyMyKeyBoardViewTrendy extends TrendyCodeKeyBoardView {
|
||||
case TrendyKeyNames.KEY_CODE_SPACE:
|
||||
onDrawCurKey(curKey, canvas, null, configBg, null);
|
||||
break;
|
||||
case TrendyKeyNames.KEY_CODE_COMPLETE, TrendyKeyNames.KEY_CODE_CANCEL:
|
||||
case TrendyKeyNames.KEY_CODE_COMPLETE:
|
||||
Log.d(TrendyApp.TAG, "-11111111111---------curImeAction=" + curImeAction);
|
||||
if (curImeAction == EditorInfo.IME_ACTION_SEARCH) {
|
||||
onDrawCurKey(curKey, canvas, "Search", configBg, null);
|
||||
} else {
|
||||
onDrawCurKey(curKey, canvas, "Done", configBg, null);
|
||||
}
|
||||
break;
|
||||
case TrendyKeyNames.KEY_CODE_CANCEL:
|
||||
Log.d(TrendyApp.TAG, "-11111111111---------curImeAction=" + curImeAction);
|
||||
if (curImeAction == EditorInfo.IME_ACTION_SEARCH) {
|
||||
onDrawCurKey(curKey, canvas, "Search", configBg, null);
|
||||
@ -210,7 +218,15 @@ public class TrendyMyKeyBoardViewTrendy extends TrendyCodeKeyBoardView {
|
||||
case TrendyKeyNames.KEY_CODE_SPACE:
|
||||
onDrawCurKey(curKey, canvas, null, themesManager.getSpaceDraw(), null);
|
||||
break;
|
||||
case TrendyKeyNames.KEY_CODE_COMPLETE, TrendyKeyNames.KEY_CODE_CANCEL:
|
||||
case TrendyKeyNames.KEY_CODE_COMPLETE:
|
||||
Log.d(TrendyApp.TAG, "-11111111111---------curImeAction=" + curImeAction);
|
||||
if (curImeAction == EditorInfo.IME_ACTION_SEARCH) {
|
||||
onDrawCurKey(curKey, canvas, "Search", themesManager.getFunctionDraw(), null);
|
||||
} else {
|
||||
onDrawCurKey(curKey, canvas, "Done", themesManager.getFunctionDraw(), null);
|
||||
}
|
||||
break;
|
||||
case TrendyKeyNames.KEY_CODE_CANCEL:
|
||||
Log.d(TrendyApp.TAG, "-11111111111---------curImeAction=" + curImeAction);
|
||||
if (curImeAction == EditorInfo.IME_ACTION_SEARCH) {
|
||||
onDrawCurKey(curKey, canvas, "Search", themesManager.getFunctionDraw(), null);
|
||||
|
||||
@ -1,22 +1,23 @@
|
||||
package com.keyborad.theme.trendyborad.trendyuiactivity
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.widget.Toast
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.ad.tradpluslibrary.TPAdManager
|
||||
import com.keyborad.theme.trendyborad.R
|
||||
import com.keyborad.theme.trendyborad.ad.AdShowFailed
|
||||
import com.keyborad.theme.trendyborad.ad.AdsInsUtil
|
||||
import com.keyborad.theme.trendyborad.ad.LoadListener
|
||||
import com.keyborad.theme.trendyborad.ad.ShowListener
|
||||
import com.keyborad.theme.trendyborad.TrendyApp
|
||||
import com.keyborad.theme.trendyborad.databinding.ActivityLaTrendyBinding
|
||||
import com.tradplus.ads.base.bean.TPAdInfo
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyCommon
|
||||
|
||||
class SplashActivity : BaseActivity() {
|
||||
/**
|
||||
* 继承Activity不要修改
|
||||
*/
|
||||
class SplashActivity : Activity() {
|
||||
|
||||
private var countDownTimer: CountDownTimer? = null
|
||||
private lateinit var vb: ActivityLaTrendyBinding
|
||||
@ -48,121 +49,48 @@ class SplashActivity : BaseActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
vb = ActivityLaTrendyBinding.inflate(layoutInflater)
|
||||
setContentView(vb.root)
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
insets
|
||||
}
|
||||
val windowInsetsController = WindowCompat.getInsetsController(window, window.decorView)
|
||||
windowInsetsController.isAppearanceLightStatusBars = true//状态栏文字颜色
|
||||
TrendyCommon.initFullScreen(this@SplashActivity,true)
|
||||
|
||||
// 1. 进来就 load 广告
|
||||
loadSplashAd()
|
||||
|
||||
// 2. 启动进度条(只启动一次)
|
||||
startProgressTimer()
|
||||
// loadSplashAd()
|
||||
//
|
||||
// // 2. 启动进度条(只启动一次)
|
||||
// startProgressTimer()
|
||||
init()
|
||||
}
|
||||
private fun init(){
|
||||
TPAdManager.init(
|
||||
this,
|
||||
TrendyApp.TAG,
|
||||
"820EA2E07D9C3C4D0DD816EB220F2711",
|
||||
"15DEDAAB580016A6FEA0F5A5DF85E712",
|
||||
"739DD8E223572D6D65CC4EC1DE1CDC12",
|
||||
"0D27FE8F7CB7A19D82235897A01DF112"
|
||||
){}
|
||||
countDownTimer =
|
||||
TPAdManager.showWelcomeAd(this, totalTime, { aLong->
|
||||
|
||||
private fun startProgressTimer() {
|
||||
countDownTimer?.cancel()
|
||||
val progressPercentage = ((100 * aLong) / totalTime)
|
||||
val countdownPercentage = 100 - progressPercentage
|
||||
vb.novaProgress.progress = countdownPercentage.toString().toInt()
|
||||
|
||||
countDownTimer = object : CountDownTimer(totalTime, tickInterval) {
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
progress += currentStep
|
||||
if (progress >= 100f) {
|
||||
progress = 100f
|
||||
vb.novaProgress.progress = 100
|
||||
cancel()
|
||||
onProgressFinished()
|
||||
} else {
|
||||
vb.novaProgress.progress = progress.toInt()
|
||||
}
|
||||
}){
|
||||
vb.novaProgress.progress = 100
|
||||
startActivity(Intent(this, TrendyCategoryActivity::class.java))
|
||||
finish()
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
// 不使用
|
||||
}
|
||||
}.start()
|
||||
countDownTimer?.start()
|
||||
}
|
||||
|
||||
|
||||
// 进度走完后的统一出口
|
||||
private fun onProgressFinished() {
|
||||
if (hasNavigated) return
|
||||
|
||||
if (adAvailable) {
|
||||
showSplashAd()
|
||||
} else {
|
||||
navigateToNext()
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadSplashAd() {
|
||||
AdsInsUtil.loadAd(
|
||||
act = this,
|
||||
adID = AdsInsUtil.Placement.TOP_ON_AD_ONE,
|
||||
loadListener = object : LoadListener {
|
||||
|
||||
override fun loaded(ad: TPAdInfo) {
|
||||
adAvailable = true
|
||||
accelerateProgress()
|
||||
}
|
||||
|
||||
override fun loadFailed(error: String) {
|
||||
adAvailable = false
|
||||
accelerateProgress()
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// 广告 load 完 → 加速
|
||||
private fun accelerateProgress() {
|
||||
currentStep = fastStep
|
||||
}
|
||||
|
||||
private fun showSplashAd() {
|
||||
AdsInsUtil.showAd(
|
||||
act = this,
|
||||
adID = AdsInsUtil.Placement.TOP_ON_AD_ONE,
|
||||
listener = object : ShowListener {
|
||||
|
||||
override fun onAdShown(ad: TPAdInfo?) {}
|
||||
|
||||
override fun onAdShowFailed(error: AdShowFailed?) {
|
||||
navigateToNext()
|
||||
}
|
||||
|
||||
override fun onAdClosed() {
|
||||
navigateToNext()
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
private fun navigateToNext() {
|
||||
if (hasNavigated) return
|
||||
hasNavigated = true
|
||||
navigateToMainActivity()
|
||||
}
|
||||
|
||||
override fun shouldInterceptBackPress(): Boolean = true
|
||||
override fun onInterceptBackPressed() {}
|
||||
|
||||
@SuppressLint("QueryPermissionsNeeded")
|
||||
private fun navigateToMainActivity() {
|
||||
try {
|
||||
startActivity(Intent(this, TrendyCategoryActivity::class.java))
|
||||
finish()
|
||||
} catch (e: Exception) {
|
||||
Toast.makeText(this, "跳转失败", Toast.LENGTH_SHORT).show()
|
||||
e.printStackTrace()
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
|
||||
@ -16,17 +16,12 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.keyborad.theme.trendyborad.R;
|
||||
import com.keyborad.theme.trendyborad.ad.AdsInsUtil;
|
||||
import com.keyborad.theme.trendyborad.ad.LoadListener;
|
||||
import com.keyborad.theme.trendyborad.databinding.ActivityCaTrendyBinding;
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyCustomTextView;
|
||||
import com.keyborad.theme.trendyborad.trendyuifragment.TrendyFragmentFavoriteKeyboard;
|
||||
import com.keyborad.theme.trendyborad.trendyuifragment.TrendyFragmentHome;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.tradplus.ads.base.bean.TPAdInfo;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyCustomTextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -127,31 +122,8 @@ public class TrendyCategoryActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
loadAd();
|
||||
|
||||
}
|
||||
|
||||
private void loadAd() {
|
||||
AdsInsUtil.INSTANCE.loadAd(this, AdsInsUtil.Placement.TOP_ON_AD_THREE, new LoadListener() {
|
||||
@Override
|
||||
public void loaded(@NotNull TPAdInfo ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadFailed(@NotNull String error) {
|
||||
|
||||
}
|
||||
});
|
||||
AdsInsUtil.INSTANCE.loadAd(this, AdsInsUtil.Placement.TOP_ON_AD_TOW, new LoadListener() {
|
||||
@Override
|
||||
public void loaded(@NotNull TPAdInfo ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadFailed(@NotNull String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -3,29 +3,25 @@ package com.keyborad.theme.trendyborad.trendyuiactivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.keyborad.theme.trendyborad.TrendyApp;
|
||||
import com.ad.tradpluslibrary.TPAdManager;
|
||||
import com.keyborad.theme.trendyborad.R;
|
||||
import com.keyborad.theme.trendyborad.ad.AdsInsUtil;
|
||||
import com.keyborad.theme.trendyborad.ad.LoadListener;
|
||||
import com.keyborad.theme.trendyborad.ad.ShowListener;
|
||||
import com.keyborad.theme.trendyborad.TrendyApp;
|
||||
import com.keyborad.theme.trendyborad.bean.BeanDetails;
|
||||
import com.keyborad.theme.trendyborad.bean.BeanWrapper;
|
||||
import com.keyborad.theme.trendyborad.databinding.ActivityCaLtTrendyBinding;
|
||||
import com.keyborad.theme.trendyborad.trendylistutils.TrendyNewCategoryAdapter; // 替换为新适配器
|
||||
import com.keyborad.theme.trendyborad.trendylistutils.TrendyNewCategoryAdapter;
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyListDecoration;
|
||||
import com.tradplus.ads.base.bean.TPAdInfo;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
|
||||
public class TrendyCategoryListActivity extends BaseActivity {
|
||||
private ActivityCaLtTrendyBinding vb;
|
||||
public static final String KEY_NAME = "class_name";
|
||||
@ -50,6 +46,12 @@ public class TrendyCategoryListActivity extends BaseActivity {
|
||||
name = getIntent().getStringExtra(KEY_NAME);
|
||||
initData();
|
||||
initClick();
|
||||
TPAdManager.INSTANCE.showTPAD(TrendyCategoryListActivity.this, new Function0<Unit>() {
|
||||
@Override
|
||||
public Unit invoke() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
@ -96,15 +98,11 @@ public class TrendyCategoryListActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
protected void onInterceptBackPressed() {
|
||||
AdsInsUtil.INSTANCE.showAd(this, AdsInsUtil.Placement.TOP_ON_AD_TOW, new ShowListener() {
|
||||
@Override
|
||||
public void onAdShown(@Nullable TPAdInfo ad) {
|
||||
loadAd();
|
||||
}
|
||||
|
||||
TPAdManager.INSTANCE.showTPAD(TrendyCategoryListActivity.this, new Function0<Unit>() {
|
||||
@Override
|
||||
public void onAdClosed() {
|
||||
loadAd();
|
||||
public Unit invoke() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
if (getBackPressedCallback() != null) {
|
||||
@ -113,12 +111,5 @@ public class TrendyCategoryListActivity extends BaseActivity {
|
||||
getOnBackPressedDispatcher().onBackPressed();
|
||||
}
|
||||
|
||||
private void loadAd(){
|
||||
AdsInsUtil.INSTANCE.loadAd(this, AdsInsUtil.Placement.TOP_ON_AD_TOW, new LoadListener() {
|
||||
@Override
|
||||
public void loadFailed(@NotNull String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -20,23 +20,24 @@ import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.keyborad.theme.trendyborad.TrendyApp
|
||||
import com.keyborad.theme.trendyborad.R
|
||||
import com.keyborad.theme.trendyborad.bean.BeanDetails
|
||||
import com.keyborad.theme.trendyborad.trendycallback.TrendyOnItemClickCallback
|
||||
import com.keyborad.theme.trendyborad.trendycallback.TrendySetKeyboardCallback
|
||||
import com.keyborad.theme.trendyborad.database.DatabaseManager
|
||||
import com.keyborad.theme.trendyborad.trendylistutils.TrendySetKeyboardMoreAdapter
|
||||
import com.keyborad.theme.trendyborad.trendyuifragment.TrendyDialogEnableKeyboard
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyCommon
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyDealZipFile
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendySaveCurrentTheme
|
||||
import com.ad.tradpluslibrary.TPAdManager
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.integration.webp.decoder.WebpDrawable
|
||||
import com.bumptech.glide.load.DataSource
|
||||
import com.bumptech.glide.load.engine.GlideException
|
||||
import com.bumptech.glide.request.RequestListener
|
||||
import com.bumptech.glide.request.target.Target
|
||||
import com.keyborad.theme.trendyborad.R
|
||||
import com.keyborad.theme.trendyborad.TrendyApp
|
||||
import com.keyborad.theme.trendyborad.bean.BeanDetails
|
||||
import com.keyborad.theme.trendyborad.database.DatabaseManager
|
||||
import com.keyborad.theme.trendyborad.trendycallback.TrendyOnItemClickCallback
|
||||
import com.keyborad.theme.trendyborad.trendycallback.TrendySetKeyboardCallback
|
||||
import com.keyborad.theme.trendyborad.trendylistutils.TrendySetKeyboardMoreAdapter
|
||||
import com.keyborad.theme.trendyborad.trendyuifragment.TrendyDialogEnableKeyboard
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyCommon
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyDealZipFile
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendySaveCurrentTheme
|
||||
import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
|
||||
@ -106,6 +107,7 @@ class TrendySetKeyboardActivity : AppCompatActivity() {
|
||||
displayData()
|
||||
setApply()
|
||||
onClick()
|
||||
TPAdManager.showTPAD(this@TrendySetKeyboardActivity) { }
|
||||
}
|
||||
|
||||
|
||||
@ -167,7 +169,10 @@ class TrendySetKeyboardActivity : AppCompatActivity() {
|
||||
|
||||
private fun onClick() {
|
||||
imgBack.setOnClickListener {
|
||||
finish()
|
||||
TPAdManager.showTPAD(this@TrendySetKeyboardActivity){
|
||||
finish()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
imgLike.setOnClickListener {
|
||||
@ -242,13 +247,16 @@ class TrendySetKeyboardActivity : AppCompatActivity() {
|
||||
|
||||
private fun setApply() {
|
||||
applyBtn.setOnClickListener {
|
||||
val checkEnable = TrendyCommon.checkEnable(this)
|
||||
val checkSetDefault = TrendyCommon.checkSetDefault(this)
|
||||
if (!checkEnable || !checkSetDefault) {
|
||||
showDialog()
|
||||
return@setOnClickListener
|
||||
TPAdManager.showTPAD(this@TrendySetKeyboardActivity) {
|
||||
val checkEnable = TrendyCommon.checkEnable(this)
|
||||
val checkSetDefault = TrendyCommon.checkSetDefault(this)
|
||||
if (!checkEnable || !checkSetDefault) {
|
||||
showDialog()
|
||||
return@showTPAD
|
||||
}
|
||||
startDown()
|
||||
}
|
||||
startDown()
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,24 +18,21 @@ import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.keyborad.theme.trendyborad.R;
|
||||
import com.keyborad.theme.trendyborad.ad.AdsInsUtil;
|
||||
import com.keyborad.theme.trendyborad.ad.LoadListener;
|
||||
import com.keyborad.theme.trendyborad.ad.ShowListener;
|
||||
import com.keyborad.theme.trendyborad.databinding.ActivitySsPwTrendyBinding;
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyKeyNames;
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyCommon;
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendySaveCurrentTheme;
|
||||
import com.ad.tradpluslibrary.TPAdManager;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.tradplus.ads.base.bean.TPAdInfo;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import com.keyborad.theme.trendyborad.R;
|
||||
import com.keyborad.theme.trendyborad.databinding.ActivitySsPwTrendyBinding;
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyCommon;
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendyKeyNames;
|
||||
import com.keyborad.theme.trendyborad.trendyutils.TrendySaveCurrentTheme;
|
||||
|
||||
import jp.wasabeef.glide.transformations.BlurTransformation;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
|
||||
|
||||
public class TrendySuccessPreviewActivity extends AppCompatActivity {
|
||||
@ -51,17 +48,7 @@ public class TrendySuccessPreviewActivity extends AppCompatActivity {
|
||||
EdgeToEdge.enable(this);
|
||||
setContentView(vb.getRoot());
|
||||
|
||||
AdsInsUtil.INSTANCE.showAd(this, AdsInsUtil.Placement.TOP_ON_AD_THREE, new ShowListener() {
|
||||
@Override
|
||||
public void onAdShown(@org.jetbrains.annotations.Nullable TPAdInfo ad) {
|
||||
loadAd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdClosed() {
|
||||
loadAd();
|
||||
}
|
||||
});
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
@ -85,7 +72,13 @@ public class TrendySuccessPreviewActivity extends AppCompatActivity {
|
||||
vb.idBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
TPAdManager.INSTANCE.showTPAD(TrendySuccessPreviewActivity.this, new Function0<Unit>() {
|
||||
@Override
|
||||
public Unit invoke() {
|
||||
finish();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (curPath == null) {
|
||||
@ -148,12 +141,5 @@ public class TrendySuccessPreviewActivity extends AppCompatActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void loadAd(){
|
||||
AdsInsUtil.INSTANCE.loadAd(this, AdsInsUtil.Placement.TOP_ON_AD_THREE, new LoadListener() {
|
||||
@Override
|
||||
public void loadFailed(@NotNull String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="10dp" />
|
||||
|
||||
<gradient
|
||||
android:startColor="#F0F9FF"
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@color/transparent</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
@ -10,7 +10,6 @@
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@color/transparent</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
|
||||
@ -3,4 +3,7 @@
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<domain tools:ignore="NetworkSecurityConfig">mobile-server.lux-ad.com</domain>
|
||||
</domain-config>
|
||||
|
||||
</network-security-config>
|
||||
|
||||
|
||||
|
||||
@ -21,3 +21,5 @@ kotlin.code.style=official
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
# Firebase Crashlytics ?? mapping ???????
|
||||
firebaseCrashlytics.mappingFileUploadTimeout=60
|
||||
@ -15,17 +15,26 @@ dependencyResolutionManagement {
|
||||
flatDir {
|
||||
dirs("libs")
|
||||
}
|
||||
maven("https://jitpack.io")
|
||||
// TradPlus
|
||||
mavenCentral()
|
||||
|
||||
//------------------------- TradPlus
|
||||
// Ironsource
|
||||
maven("https://android-sdk.is.com/")
|
||||
maven { url = uri("https://android-sdk.is.com/") }
|
||||
// Pangle
|
||||
maven("https://artifact.bytedance.com/repository/pangle")
|
||||
maven { url = uri("https://artifact.bytedance.com/repository/pangle") }
|
||||
// Chartboost
|
||||
maven { url = uri("https://cboost.jfrog.io/artifactory/chartboost-ads/") }
|
||||
maven {
|
||||
name = "Chartboost Mediation’s maven repo"
|
||||
url = uri("https://cboost.jfrog.io/artifactory/chartboost-mediation")
|
||||
}
|
||||
// Mintegral
|
||||
//Launch GP market application, Android X Version
|
||||
//If you fail to pull the code using gradle, add the maven warehouse configuration to the project root build.gradle file
|
||||
maven("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea")
|
||||
maven {
|
||||
url = uri("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea")
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user