V1.3(4)
This commit is contained in:
parent
cb366893eb
commit
0c4b5a4538
@ -6,6 +6,8 @@ plugins {
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("io.objectbox")
|
||||
kotlin("kapt")
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
}
|
||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||
android {
|
||||
@ -17,8 +19,8 @@ android {
|
||||
applicationId = "com.wall.photography.picture"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = 3
|
||||
versionName = "1.2"
|
||||
versionCode = 4
|
||||
versionName = "1.3"
|
||||
|
||||
setProperty("archivesBaseName", "Picture_v" + versionName + "(${versionCode})_$timestamp")
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
@ -53,12 +55,92 @@ dependencies {
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
implementation ("com.github.bumptech.glide:glide:5.0.5")
|
||||
implementation ("jp.wasabeef:glide-transformations:4.3.0") // Glide Transformations
|
||||
implementation("com.squareup.okhttp3:okhttp:5.3.1")
|
||||
|
||||
|
||||
// ObjectBox
|
||||
implementation("io.objectbox:objectbox-android:5.0.1")
|
||||
implementation("io.objectbox:objectbox-kotlin:5.0.1")
|
||||
kapt("io.objectbox:objectbox-processor:5.0.1")
|
||||
|
||||
|
||||
implementation(platform("com.google.firebase:firebase-bom:34.6.0"))
|
||||
implementation("com.google.firebase:firebase-crashlytics")
|
||||
implementation("com.google.firebase:firebase-analytics")
|
||||
implementation("com.google.firebase:firebase-config")
|
||||
|
||||
implementation(files("libs/TradPlusLibrary_11_25_15_02-release.aar"))
|
||||
implementation(files("libs/UpLoadLibrary_12_03_15_13-release.aar"))
|
||||
|
||||
implementation ("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
||||
|
||||
// TradPlus
|
||||
implementation("com.tradplusad:tradplus:14.5.0.1")
|
||||
//noinspection GradleCompatible
|
||||
implementation("androidx.legacy:legacy-support-v4:1.0.0")
|
||||
implementation("androidx.appcompat:appcompat:1.3.0-alpha02")
|
||||
// Meta
|
||||
implementation("com.facebook.android:audience-network-sdk:6.20.0")
|
||||
implementation("com.tradplusad:tradplus-facebook:1.14.5.0.1")
|
||||
// Applovin
|
||||
implementation("com.applovin:applovin-sdk:13.3.1")
|
||||
implementation("com.tradplusad:tradplus-applovin:9.14.5.0.1")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.2.0")
|
||||
// Ironsource
|
||||
implementation("com.ironsource.sdk:mediationsdk:8.10.0")
|
||||
implementation("com.tradplusad:tradplus-ironsource:10.14.5.0.1")
|
||||
implementation("com.google.android.gms:play-services-appset:16.0.0")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
|
||||
implementation("com.google.android.gms:play-services-basement:17.5.0")
|
||||
// Adcolony
|
||||
implementation("com.adcolony:sdk:4.8.0")
|
||||
implementation("com.tradplusad:tradplus-adcolony:4.14.5.0.1")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
|
||||
// Pangle
|
||||
implementation("com.tradplusad:tradplus-pangle:19.14.5.0.1")
|
||||
implementation("com.pangle.global:pag-sdk:7.3.0.3")
|
||||
// UnityAds
|
||||
implementation("com.tradplusad:tradplus-unity:5.14.5.0.1")
|
||||
implementation("com.unity3d.ads:unity-ads:4.15.1")
|
||||
// Chartboost
|
||||
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.14.5.0.1")
|
||||
implementation("com.inmobi.monetization:inmobi-ads-kotlin:10.8.3")
|
||||
implementation("androidx.core:core-ktx:1.5.0")
|
||||
implementation("com.inmobi.omsdk:inmobi-omsdk:1.5.2.0")
|
||||
// Fyber
|
||||
implementation("com.fyber:marketplace-sdk:8.3.7")
|
||||
implementation("com.tradplusad:tradplus-fyber:24.14.5.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")
|
||||
// Start.io
|
||||
implementation("com.startapp:inapp-sdk:5.2.3")
|
||||
implementation("com.tradplusad:tradplus-startapp:28.14.5.0.1")
|
||||
// Mintegral
|
||||
implementation("com.tradplusad:tradplus-mintegralx_overseas:18.14.5.0.1")
|
||||
implementation("androidx.recyclerview:recyclerview:1.1.0")
|
||||
implementation("com.mbridge.msdk.oversea:mbridge_android_sdk:16.9.71")
|
||||
// Liftoff
|
||||
implementation("com.tradplusad:tradplus-vunglex:7.14.5.0.1")
|
||||
implementation("com.vungle:vungle-ads:7.5.0")
|
||||
// Yandex
|
||||
// implementation("com.yandex.android:mobileads:7.13.0") {
|
||||
// exclude(group = "com.caverock", module = "androidsvg-aar")
|
||||
// }
|
||||
// implementation("com.tradplusad:tradplus-yandex:50.14.6.10.1")
|
||||
// Bigo
|
||||
implementation("com.bigossp:bigo-ads:5.4.0")
|
||||
implementation("com.tradplusad:tradplus-bigo:57.14.5.0.1")
|
||||
// Cross Promotion
|
||||
implementation("com.tradplusad:tradplus-crosspromotion:27.14.5.0.1")
|
||||
// TP Exchange
|
||||
// 请注意保持与主包版本同步更新
|
||||
implementation("com.google.code.gson:gson:2.8.6")
|
||||
implementation("com.tradplusad:tp_exchange:40.14.5.0.1")
|
||||
|
||||
// Google UMP
|
||||
implementation ("com.google.android.ump:user-messaging-platform:3.2.0")
|
||||
|
||||
|
||||
|
||||
}
|
||||
29
app/google-services.json
Normal file
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "642563868318",
|
||||
"project_id": "picture-2659c",
|
||||
"storage_bucket": "picture-2659c.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:642563868318:android:298210d8b25d2ec2189d8f",
|
||||
"android_client_info": {
|
||||
"package_name": "com.wall.photography.picture"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyCsxJsfYry_y5NKzKERUnbdOfNe8p6J_hM"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
BIN
app/libs/TradPlusLibrary_11_25_15_02-release.aar
Normal file
BIN
app/libs/TradPlusLibrary_11_25_15_02-release.aar
Normal file
Binary file not shown.
BIN
app/libs/UpLoadLibrary_12_03_15_13-release.aar
Normal file
BIN
app/libs/UpLoadLibrary_12_03_15_13-release.aar
Normal file
Binary file not shown.
5
app/proguard-rules.pro
vendored
5
app/proguard-rules.pro
vendored
@ -19,10 +19,13 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-keep class com.wall.photography.picture.Data.** { *; }
|
||||
|
||||
-keep class com.wall.photography.picture.data_bean.Data { *; }
|
||||
-keep class com.google.gson.** { *; }
|
||||
-keepattributes Signature
|
||||
-keepattributes AnnotationDefault,RuntimeVisibleAnnotations
|
||||
-keep public class com.tradplus.** { *; }
|
||||
-keep class com.tradplus.ads.** { *; }
|
||||
|
||||
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32" />
|
||||
@ -16,18 +17,20 @@
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/icon"
|
||||
android:label="@string/app_name"
|
||||
android:networkSecurityConfig="@xml/net"
|
||||
tools:replace="networkSecurityConfig"
|
||||
android:roundIcon="@mipmap/icon"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Wallpaper"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name="com.wall.photography.picture.Activity.Search"
|
||||
android:name="com.wall.photography.picture.activity.Search"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name="com.wall.photography.picture.Activity.List"
|
||||
android:name="com.wall.photography.picture.activity.ListAct"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name="com.wall.photography.picture.Activity.Splash"
|
||||
android:name="com.wall.photography.picture.activity.Splash"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.WelWallpaper">
|
||||
<intent-filter>
|
||||
@ -37,10 +40,10 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.wall.photography.picture.Activity.Wallpaper"
|
||||
android:name="com.wall.photography.picture.activity.Wallpaper"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name="com.wall.photography.picture.Activity.Main"
|
||||
android:name="com.wall.photography.picture.activity.Main"
|
||||
android:exported="false" />
|
||||
</application>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.wall.photography.picture.Connect;
|
||||
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
|
||||
public interface ItemClick {
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.wall.photography.picture.Connect;
|
||||
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.wall.photography.picture.Connect;
|
||||
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
|
||||
public interface OnUpdateLike {
|
||||
void onAdd(Data data);
|
||||
|
||||
@ -5,7 +5,8 @@ import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.Log;
|
||||
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.up.uploadlibrary.UpLoadManager;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
import com.wall.photography.picture.tool.CommonUtils;
|
||||
import com.wall.photography.picture.tool.JsonParser;
|
||||
import com.wall.photography.picture.tool.ObjectBoxManager;
|
||||
@ -18,6 +19,9 @@ import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
public class MyApp extends Application {
|
||||
public static Context mAppContext;
|
||||
|
||||
@ -42,7 +46,12 @@ public class MyApp extends Application {
|
||||
super.onCreate();
|
||||
mAppContext = this;
|
||||
defaultFont = Typeface.createFromAsset(getAssets(), "custfont.ttf");
|
||||
|
||||
UpLoadManager.INSTANCE.init(this, TAG, new Function2<String, String, Unit>() {
|
||||
@Override
|
||||
public Unit invoke(String s, String s2) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
ObjectBoxManager.init(this);
|
||||
executor = Executors.newFixedThreadPool(8);
|
||||
String[] names = {wallpaperName, animasName, filmName};
|
||||
@ -92,28 +101,5 @@ public class MyApp extends Application {
|
||||
}
|
||||
|
||||
|
||||
// private void initTop(){
|
||||
// ATSDK.checkIsEuTraffic(this, new NetTrafficeCallback() {
|
||||
//
|
||||
// @Override
|
||||
// public void onResultCallback(boolean isEU) {
|
||||
// Log.e(TAG, "onResultCallback:" + isEU);
|
||||
// if (isEU && ATSDK.getGDPRDataLevel( MyApp.mAppContext) == ATSDK.UNKNOWN) {
|
||||
// ATSDK.showGdprAuth(MyApp.mAppContext);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onErrorCallback(String errorMsg) {
|
||||
// Log.e(TAG, "onErrorCallback:" + errorMsg);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// ATSDK.init( this, APPId, AppKey);
|
||||
// //测试工具
|
||||
//// ATDebuggerUITest.showDebuggerUI(this,debug_Key);
|
||||
// AdManager.loadAllAd();
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||
import com.wall.photography.picture.MyApp;
|
||||
import com.wall.photography.picture.R;
|
||||
import com.wall.photography.picture.tool.ObjectBoxManager;
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
import com.wall.photography.picture.Connect.ItemClick;
|
||||
import com.wall.photography.picture.tool.CommonUtils;
|
||||
|
||||
|
||||
@ -17,18 +17,16 @@ import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.DecodeFormat;
|
||||
import com.bumptech.glide.load.MultiTransformation;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.wall.photography.picture.R;
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
import com.wall.photography.picture.Connect.ItemClick;
|
||||
import com.wall.photography.picture.tool.CommonUtils;
|
||||
|
||||
|
||||
@ -1,117 +0,0 @@
|
||||
package com.wall.photography.picture.Project;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.MultiTransformation;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.wall.photography.picture.MyApp;
|
||||
import com.wall.photography.picture.R;
|
||||
import com.wall.photography.picture.databinding.ProjectMainBinding;
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.tool.CommonUtils;
|
||||
import com.wall.photography.picture.tool.ObjectBoxManager;
|
||||
import com.wall.photography.picture.Connect.ItemClick;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
|
||||
|
||||
public class Main extends RecyclerView.Adapter<Main.HomeParentHolder> {
|
||||
private List<String> data = new ArrayList<>();
|
||||
private Context mContext;
|
||||
private ItemClick listener;
|
||||
private MultiTransformation<Bitmap> multiTransformation = new MultiTransformation<>(
|
||||
new CenterCrop(),
|
||||
new RoundedCornersTransformation(CommonUtils.dp2Px(12), 0)
|
||||
);
|
||||
|
||||
public void setData(List<String> data) {
|
||||
this.data = data;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setInfoWallpaperListener(ItemClick onItemClick) {
|
||||
this.listener = onItemClick;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public HomeParentHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
mContext = parent.getContext();
|
||||
ProjectMainBinding inflate = ProjectMainBinding.inflate(LayoutInflater.from(mContext), parent, false);
|
||||
return new HomeParentHolder(inflate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull HomeParentHolder holder, int position) {
|
||||
String name = data.get(position);
|
||||
List<Data> data1 = ObjectBoxManager.queryHome(name);
|
||||
String previewUrl400 = data1.get(0).getPreviewUrl1080();
|
||||
|
||||
holder.itemBing.tvClassName.setText(name);
|
||||
if (position == data.size() - 1) {
|
||||
holder.itemBing.spaceView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.itemBing.spaceView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
Glide.with(mContext)
|
||||
.asDrawable()
|
||||
.skipMemoryCache(true)
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.load(previewUrl400)
|
||||
.listener(new RequestListener<Drawable>() {
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e, @Nullable Object model, @NonNull Target<Drawable> target, boolean isFirstResource) {
|
||||
Log.d(MyApp.TAG, "------------e=" + e.getMessage() + "---previewUrl400=" + previewUrl400);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onResourceReady(@NonNull Drawable resource, @NonNull Object model, Target<Drawable> target, @NonNull DataSource dataSource, boolean isFirstResource) {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.placeholder(R.mipmap.im_placeholder)
|
||||
.into(holder.itemBing.preview);
|
||||
|
||||
holder.itemBing.preview.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
listener.onClickMore(name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
static class HomeParentHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
private ProjectMainBinding itemBing;
|
||||
|
||||
public HomeParentHolder(@NonNull ProjectMainBinding itemView) {
|
||||
super(itemView.getRoot());
|
||||
itemBing = itemView;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.wall.photography.picture.Activity;
|
||||
package com.wall.photography.picture.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@ -7,14 +7,18 @@ import android.view.View;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.ad.tradpluslibrary.TPAdManager;
|
||||
import com.wall.photography.picture.databinding.ActivityListBinding;
|
||||
import com.wall.photography.picture.tool.CommonUtils;
|
||||
import com.wall.photography.picture.tool.ObjectBoxManager;
|
||||
import com.wall.photography.picture.tool.GridItemDecoration;
|
||||
import com.wall.photography.picture.Connect.ItemClick;
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
|
||||
public class List extends AppCompatActivity implements ItemClick {
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
|
||||
public class ListAct extends AppCompatActivity implements ItemClick {
|
||||
private ActivityListBinding vb;
|
||||
|
||||
private String categoryName;
|
||||
@ -32,7 +36,19 @@ public class List extends AppCompatActivity implements ItemClick {
|
||||
vb.imageviewBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
TPAdManager.INSTANCE.showTPAD(ListAct.this, new Function0<Unit>() {
|
||||
@Override
|
||||
public Unit invoke() {
|
||||
finish();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
TPAdManager.INSTANCE.showTPAD(ListAct.this, new Function0<Unit>() {
|
||||
@Override
|
||||
public Unit invoke() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -52,7 +68,7 @@ public class List extends AppCompatActivity implements ItemClick {
|
||||
vb.list.addItemDecoration(itemHelper);
|
||||
vb.list.setLayoutManager(gridLayoutManager);
|
||||
int height = CommonUtils.dp2Px(180);
|
||||
com.wall.photography.picture.Project.List itemList = new com.wall.photography.picture.Project.List(this, height,false);
|
||||
com.wall.photography.picture.Project.List itemList = new com.wall.photography.picture.Project.List(this, height, false);
|
||||
itemList.setDataInfo(data);
|
||||
itemList.setInfoWallpaperListener(this);
|
||||
vb.list.setAdapter(itemList);
|
||||
@ -1,4 +1,4 @@
|
||||
package com.wall.photography.picture.Activity;
|
||||
package com.wall.photography.picture.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.wall.photography.picture.Activity
|
||||
package com.wall.photography.picture.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
@ -9,14 +9,16 @@ import android.widget.TextView.OnEditorActionListener
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.ad.tradpluslibrary.TPAdManager
|
||||
|
||||
import com.wall.photography.picture.Connect.ItemClick
|
||||
import com.wall.photography.picture.data_bean.Data
|
||||
import com.wall.photography.picture.Project.List
|
||||
import com.wall.photography.picture.R
|
||||
import com.wall.photography.picture.databinding.ActivitySearchBinding
|
||||
import com.wall.photography.picture.tool.CommonUtils
|
||||
import com.wall.photography.picture.tool.ObjectBoxManager
|
||||
import com.wall.photography.picture.tool.GridItemDecoration
|
||||
import com.wall.photography.picture.Connect.ItemClick
|
||||
import com.wall.photography.picture.Data.Data
|
||||
import com.wall.photography.picture.Project.List
|
||||
import com.wall.photography.picture.tool.ObjectBoxManager
|
||||
|
||||
class Search : AppCompatActivity() ,
|
||||
ItemClick {
|
||||
@ -41,6 +43,7 @@ class Search : AppCompatActivity() ,
|
||||
startSearch()
|
||||
}
|
||||
}
|
||||
TPAdManager.showTPAD(this@Search) { null }
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.wall.photography.picture.Activity;
|
||||
package com.wall.photography.picture.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
@ -7,15 +7,21 @@ import android.os.CountDownTimer;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.ad.tradpluslibrary.TPAdManager;
|
||||
import com.wall.photography.picture.MyApp;
|
||||
import com.wall.photography.picture.databinding.ActivitySplashBinding;
|
||||
import com.wall.photography.picture.tool.CommonUtils;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
public class Splash extends AppCompatActivity {
|
||||
|
||||
private CountDownTimer countDownTimer;
|
||||
private ActivitySplashBinding vb;
|
||||
|
||||
private long totalTime = 2000;
|
||||
private long totalTime = 13000;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
@ -25,44 +31,39 @@ public class Splash extends AppCompatActivity {
|
||||
CommonUtils.initFull(this,true);
|
||||
setContentView(vb.getRoot());
|
||||
|
||||
|
||||
countDownTimer = new CountDownTimer(totalTime,100) {
|
||||
TPAdManager.INSTANCE.init(
|
||||
this,
|
||||
MyApp.TAG,
|
||||
"EA88C446DC518123368740F48AFF2211",
|
||||
"0010352AA641462D65A2B02050D47212",
|
||||
"0D33D11E182C3FBF8F7DB6BC84CD1312",
|
||||
"ECA0F6C0B3B407E78D5BCAD9483AA112", new Function0<Unit>() {
|
||||
@Override
|
||||
public Unit invoke() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
) ;
|
||||
countDownTimer = TPAdManager.INSTANCE.showWelcomeAd(this, totalTime, new Function1<Long, Unit>() {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
int progressPercentage = (int) ((100 * millisUntilFinished) / totalTime);
|
||||
public Unit invoke(Long aLong) {
|
||||
int progressPercentage = (int) ((100 * aLong) / totalTime);
|
||||
|
||||
int countdownPercentage = 100 - progressPercentage;
|
||||
|
||||
vb.progressbar.setProgress(countdownPercentage);
|
||||
return null;
|
||||
}
|
||||
|
||||
}, new Function0<Unit>() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
public Unit invoke() {
|
||||
vb.progressbar.setProgress(100);
|
||||
Intent intent = new Intent(Splash.this, Main.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
// countDownTimer = AdManager.showWelcomeAd(this, totalTime, new CountAction() {
|
||||
// @Override
|
||||
// public void onCount(long millisUntilFinished) {
|
||||
// int progressPercentage = (int) ((100 * millisUntilFinished) / totalTime);
|
||||
//
|
||||
// int countdownPercentage = 100 - progressPercentage;
|
||||
//
|
||||
// vb.progressbar.setProgress(countdownPercentage);
|
||||
// }
|
||||
// }, new GoMainAction() {
|
||||
// @Override
|
||||
// public void onGo() {
|
||||
// vb.progressbar.setProgress(100);
|
||||
// Intent intent = new Intent(WElActivity.this, HomeActivity.class);
|
||||
// startActivity(intent);
|
||||
// finish();
|
||||
// }
|
||||
// });
|
||||
}) ;
|
||||
countDownTimer.start();
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.wall.photography.picture.Activity;
|
||||
package com.wall.photography.picture.activity;
|
||||
|
||||
|
||||
import android.app.WallpaperManager;
|
||||
@ -15,6 +15,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.ad.tradpluslibrary.TPAdManager;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.DecodeFormat;
|
||||
@ -31,7 +32,7 @@ import com.wall.photography.picture.tool.CommonUtils;
|
||||
import com.wall.photography.picture.tool.ObjectBoxManager;
|
||||
import com.wall.photography.picture.tool.JsonParser;
|
||||
import com.wall.photography.picture.Connect.SelectType;
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@ -39,6 +40,7 @@ import java.io.InputStream;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import okhttp3.Call;
|
||||
|
||||
@ -79,6 +81,12 @@ public class Wallpaper extends AppCompatActivity implements SelectType {
|
||||
initClick();
|
||||
loadDetail();
|
||||
vb.tvContent.setText(data.getDescription());
|
||||
TPAdManager.INSTANCE.showTPAD(Wallpaper.this, new Function0<Unit>() {
|
||||
@Override
|
||||
public Unit invoke() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void loadDetail() {
|
||||
@ -152,13 +160,22 @@ public class Wallpaper extends AppCompatActivity implements SelectType {
|
||||
});
|
||||
|
||||
vb.buttonSet.setOnClickListener(v -> {
|
||||
if (dialogType == null) {
|
||||
dialogType = new MyDialog();
|
||||
dialogType.setListener(Wallpaper.this);
|
||||
}
|
||||
if (!dialogType.isAdded()) {
|
||||
dialogType.show(getSupportFragmentManager(), "");
|
||||
}
|
||||
|
||||
TPAdManager.INSTANCE.showTPAD(Wallpaper.this, new Function0<Unit>() {
|
||||
@Override
|
||||
public Unit invoke() {
|
||||
if (dialogType == null) {
|
||||
dialogType = new MyDialog();
|
||||
dialogType.setListener(Wallpaper.this);
|
||||
}
|
||||
if (!dialogType.isAdded()) {
|
||||
dialogType.show(getSupportFragmentManager(), "");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
@ -180,9 +197,14 @@ public class Wallpaper extends AppCompatActivity implements SelectType {
|
||||
if (!permission) {
|
||||
return;
|
||||
}
|
||||
startSaveToAlbum();
|
||||
|
||||
|
||||
TPAdManager.INSTANCE.showTPAD(Wallpaper.this, new Function0<Unit>() {
|
||||
@Override
|
||||
public Unit invoke() {
|
||||
startSaveToAlbum();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.wall.photography.picture.Data;
|
||||
package com.wall.photography.picture.data_bean;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@ -12,14 +12,14 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.wall.photography.picture.MyApp;
|
||||
import com.wall.photography.picture.R;
|
||||
import com.wall.photography.picture.Activity.Wallpaper;
|
||||
import com.wall.photography.picture.activity.Wallpaper;
|
||||
import com.wall.photography.picture.databinding.FragmentLikeBinding;
|
||||
import com.wall.photography.picture.tool.CommonUtils;
|
||||
import com.wall.photography.picture.tool.ObjectBoxManager;
|
||||
import com.wall.photography.picture.tool.GridItemDecoration;
|
||||
import com.wall.photography.picture.Connect.ItemClick;
|
||||
import com.wall.photography.picture.Connect.LikeList;
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -8,9 +8,9 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.wall.photography.picture.Activity.Wallpaper
|
||||
import com.wall.photography.picture.activity.Wallpaper
|
||||
import com.wall.photography.picture.Connect.ItemClick
|
||||
import com.wall.photography.picture.Data.Data
|
||||
import com.wall.photography.picture.data_bean.Data
|
||||
import com.wall.photography.picture.Project.List
|
||||
import com.wall.photography.picture.databinding.FragmentMainChildBinding
|
||||
import com.wall.photography.picture.tool.CommonUtils
|
||||
|
||||
@ -10,16 +10,15 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
|
||||
import com.wall.photography.picture.R;
|
||||
import com.wall.photography.picture.Activity.Search;
|
||||
import com.wall.photography.picture.Activity.Wallpaper;
|
||||
import com.wall.photography.picture.activity.ListAct;
|
||||
import com.wall.photography.picture.activity.Search;
|
||||
import com.wall.photography.picture.activity.Wallpaper;
|
||||
import com.wall.photography.picture.databinding.FragmentMainBinding;
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
import com.wall.photography.picture.tool.CommonUtils;
|
||||
import com.wall.photography.picture.tool.GridItemDecoration;
|
||||
import com.wall.photography.picture.Connect.ItemClick;
|
||||
import com.wall.photography.picture.Project.List;
|
||||
import com.wall.photography.picture.tool.ObjectBoxManager;
|
||||
@ -59,7 +58,7 @@ public class MainFragment extends Fragment implements ItemClick {
|
||||
|
||||
private void initTabVp() {
|
||||
vb.loadingPb.setVisibility(View.GONE);
|
||||
initList();
|
||||
|
||||
initTags();
|
||||
|
||||
}
|
||||
@ -281,46 +280,10 @@ public class MainFragment extends Fragment implements ItemClick {
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshListData() {
|
||||
java.util.List<Data> data = ObjectBoxManager.queryWallpapersByTag(currentTag, 500);
|
||||
if (itemList != null) {
|
||||
itemList.setDataInfo(data);
|
||||
} else {
|
||||
initList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void initList() {
|
||||
// java.util.List<Data> data = ObjectBoxManager.queryWallpapersByTag(currentTag, 500);
|
||||
// android.util.Log.d("FragmentMain", "已載入 " + data.size() + " 張圖片,標籤: " + currentTag);
|
||||
//
|
||||
// if (data.isEmpty()) {
|
||||
// android.util.Log.e("FragmentMain", "數據庫中沒有找到數據!請檢查數據是否正確加載。");
|
||||
// // 顯示錯誤提示給用戶
|
||||
// if (getActivity() != null) {
|
||||
// getActivity().runOnUiThread(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// android.widget.Toast.makeText(requireContext(),
|
||||
// "正在載入圖片數據,請稍候...",
|
||||
// android.widget.Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// GridItemDecoration itemHelper = new GridItemDecoration(10, 10, 0);
|
||||
// GridLayoutManager gridLayoutManager = new GridLayoutManager(requireContext(), 3);
|
||||
// vb.classRecycler.addItemDecoration(itemHelper);
|
||||
// vb.classRecycler.setLayoutManager(gridLayoutManager);
|
||||
// int height = CommonUtils.dp2Px(180);
|
||||
// itemList = new List(requireContext(), height, false);
|
||||
// itemList.setDataInfo(data);
|
||||
// itemList.setInfoWallpaperListener(this);
|
||||
// vb.classRecycler.setAdapter(itemList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onItemClickAction(Data info) {
|
||||
@ -331,16 +294,16 @@ public class MainFragment extends Fragment implements ItemClick {
|
||||
|
||||
@Override
|
||||
public void onClickMore(String name) {
|
||||
Intent intent = new Intent(requireContext(), com.wall.photography.picture.Activity.List.class);
|
||||
intent.putExtra(com.wall.photography.picture.Activity.List.key_index, name);
|
||||
Intent intent = new Intent(requireContext(), ListAct.class);
|
||||
intent.putExtra(ListAct.key_index, name);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTagClick(String tagType, Data info) {
|
||||
// 点击标签后,跳转到列表页面,显示所有壁纸(标签用于筛选)
|
||||
Intent intent = new Intent(requireContext(), com.wall.photography.picture.Activity.List.class);
|
||||
intent.putExtra(com.wall.photography.picture.Activity.List.key_index, tagType);
|
||||
Intent intent = new Intent(requireContext(), ListAct.class);
|
||||
intent.putExtra(ListAct.key_index, tagType);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import android.provider.MediaStore
|
||||
import android.util.Log
|
||||
import androidx.core.app.ActivityCompat
|
||||
import com.wall.photography.picture.MyApp
|
||||
import com.wall.photography.picture.Data.Data
|
||||
import com.wall.photography.picture.data_bean.Data
|
||||
import okhttp3.Call
|
||||
import okhttp3.Callback
|
||||
import okhttp3.OkHttpClient
|
||||
|
||||
@ -6,9 +6,9 @@ import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.wall.photography.picture.MyApp;
|
||||
import com.wall.photography.picture.Data.Data;
|
||||
import com.wall.photography.picture.Data.Data_;
|
||||
import com.wall.photography.picture.Data.MyObjectBox;
|
||||
import com.wall.photography.picture.data_bean.Data;
|
||||
import com.wall.photography.picture.data_bean.Data_;
|
||||
import com.wall.photography.picture.data_bean.MyObjectBox;
|
||||
import com.wall.photography.picture.Connect.OnUpdateLike;
|
||||
import com.wall.photography.picture.Connect.LikeList;
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="10dp"
|
||||
tools:context="com.wall.photography.picture.Activity.List">
|
||||
tools:context="com.wall.photography.picture.activity.ListAct">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageview_back"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="30dp"
|
||||
android:background="@drawable/bg_gradient_green_light"
|
||||
tools:context="com.wall.photography.picture.Activity.Main">
|
||||
tools:context="com.wall.photography.picture.activity.Main">
|
||||
|
||||
<com.wall.photography.picture.tool.CustomTextView
|
||||
android:id="@+id/textview_wallpaper"
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.wall.photography.picture.Activity.Splash">
|
||||
tools:context="com.wall.photography.picture.activity.Splash">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.wall.photography.picture.Activity.Wallpaper">
|
||||
tools:context="com.wall.photography.picture.activity.Wallpaper">
|
||||
|
||||
|
||||
<ImageView
|
||||
|
||||
6
app/src/main/res/xml/net.xml
Normal file
6
app/src/main/res/xml/net.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config xmlns:tools="http://schemas.android.com/tools">
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<domain tools:ignore="NetworkSecurityConfig">mobile-server.lux-ad.com</domain>
|
||||
</domain-config>
|
||||
</network-security-config>
|
||||
@ -2,7 +2,8 @@
|
||||
plugins {
|
||||
id("com.android.application") version "8.11.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.2.21" apply false
|
||||
|
||||
id("com.google.gms.google-services") version "4.4.4" apply false
|
||||
id ("com.google.firebase.crashlytics") version "3.0.6" apply false
|
||||
}
|
||||
|
||||
buildscript {
|
||||
|
||||
@ -10,29 +10,26 @@ dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
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")
|
||||
//
|
||||
// //TopOn集成测试工具
|
||||
// maven ( "https://jfrog.anythinktech.com/artifactory/debugger")
|
||||
//------------------------- TradPlus
|
||||
// Ironsource
|
||||
maven { url = uri("https://android-sdk.is.com/") }
|
||||
// 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 {
|
||||
url =
|
||||
uri("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user