This commit is contained in:
zhouzhijia 2024-08-19 15:45:27 +08:00
parent fe45d77a92
commit 2e66a203f1
7 changed files with 22 additions and 205 deletions

View File

@ -24,8 +24,8 @@ android {
applicationId = "com.fun.funnyprank" applicationId = "com.fun.funnyprank"
minSdk = 23 minSdk = 23
targetSdk = 34 targetSdk = 34
versionCode = 4 versionCode = 6
versionName = "1.0.3" versionName = "1.0.5"
setProperty( setProperty(
"archivesBaseName", "archivesBaseName",
"funnyprank_v" + versionName + "(${versionCode})_$timestamp" "funnyprank_v" + versionName + "(${versionCode})_$timestamp"
@ -66,13 +66,12 @@ dependencies {
implementation("androidx.room:room-runtime:$room_version") implementation("androidx.room:room-runtime:$room_version")
annotationProcessor("androidx.room:room-compiler:$room_version") annotationProcessor("androidx.room:room-compiler:$room_version")
kapt("androidx.room:room-compiler:$room_version") kapt("androidx.room:room-compiler:$room_version")
implementation("androidx.room:room-ktx:$room_version") // implementation("androidx.room:room-ktx:$room_version")
implementation("androidx.room:room-rxjava2:$room_version") // implementation("androidx.room:room-rxjava2:$room_version")
implementation("androidx.room:room-rxjava3:$room_version") // implementation("androidx.room:room-rxjava3:$room_version")
implementation("androidx.room:room-guava:$room_version") // implementation("androidx.room:room-guava:$room_version")
testImplementation("androidx.room:room-testing:$room_version") // testImplementation("androidx.room:room-testing:$room_version")
implementation("androidx.room:room-paging:$room_version") // implementation("androidx.room:room-paging:$room_version")
implementation(platform("com.google.firebase:firebase-bom:33.1.1")) implementation(platform("com.google.firebase:firebase-bom:33.1.1"))

Binary file not shown.

View File

@ -875,88 +875,7 @@
} }
] ]
}, },
{
"categoryId": "625f83491fea07887e619070",
"categoryName": "Scary",
"categoryUrl": "https://resource-sg-public.lux-ad.com/prank/6278fe84a68fcd4460cdd386c6e416a9.png",
"list": [
{
"title": "Scary 1",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/528d36e86c6c907fcd269dfb11d36e7f.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 2",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/017425f1d43d5d5a2ddb30d5c98b833e.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 3",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/6d4cad59de5cde890f3ad91fc97a01bf.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 4",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/81bd6eccee3776b9f0739c844900589f.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 5",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/10e36b4a6be36d66da6e8a412fe2dc38.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 6",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/03be97cf98b8fdfe2bfc6192ca38e295.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 7",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/2c234ea6d1714c5f921a11a0cb04b959.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 8",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/e0f85cd581a950931ccd70c0a8f18284.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 9",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/eec0a36a322ba705914de17be1844902.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 10",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/c9b387e84b03367983b8c5956c027fd3.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 11",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/81950f0fe7a87a8d919f90f6c7a126ac.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 12",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/b490c3b6de2845d27f785cc038651a7d.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 13",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/54faf2f18d3aa3fdd1cf6288280dee33.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 14",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/ffae2d80b33be19ce3ed46b71fa2e89c.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
},
{
"title": "Scary 15",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/32469294894ddb9e7f0d0470944c96ef.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/45dd88855533ed768453de20d00e24d2.png"
}
]
},
{ {
"categoryId": "625f83491fea07887e619071", "categoryId": "625f83491fea07887e619071",
"categoryName": "Toilet Flushing", "categoryName": "Toilet Flushing",
@ -3279,112 +3198,5 @@
"preUrl": "https://resource-sg-public.lux-ad.com/prank/814007103cf43c6a1034f2ff72415659.png" "preUrl": "https://resource-sg-public.lux-ad.com/prank/814007103cf43c6a1034f2ff72415659.png"
} }
] ]
},
{
"categoryId": "634e0d283a35295ff1e9d782",
"categoryName": "Halloween",
"categoryUrl": "https://resource-sg-public.lux-ad.com/prank/346541dfd63bb11359fecb4913bbbf13.png",
"list": [
{
"title": "Halloween 1",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/addaa62eb812fc77b8c9c62f4a10c87c.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/5eab6b3a9c261f0248c63b3b96dcd7f4.png"
},
{
"title": "Halloween 2",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/8dd4ab99f8fa228c05ddd8c36a1fb8ed.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/10de3be681254f26de6351c2ed683ea9.png"
},
{
"title": "Halloween 3",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/54f1373123ee2d3c6eafcfd0ee1534fb.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/6a500627588ec7c8133cd2e8737a29ef.png"
},
{
"title": "Halloween 4",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/d9639d6b964952898e925057737f179b.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/80c18bc4d370f912d4ba7e99ac389df7.png"
},
{
"title": "Halloween 5",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/d1fb6ceaa60e105425a016d809f72fcc.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/e3a9a9aed7c1391218e743a61bee052a.png"
},
{
"title": "Halloween 6",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/bcbc8fbaf653b3f8388ff25211015a18.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/5ac0c7f0469c99417fd12ae7e3fa07af.png"
},
{
"title": "Halloween 7",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/2adbaf76aad03b5b59e338e7c547e65c.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/df60f70ad97c86c77c828605dc106555.png"
},
{
"title": "Halloween 8",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/8885f6857e6e3aebc8cc0b9aedbe2e88.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/82153ac03f55b18e9d3a57650b86702d.png"
},
{
"title": "Halloween 9",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/5548a044a4b88dde27d7edbe0fd45a28.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/d430f6bdf723e5c7dfe50f4567aefb88.png"
},
{
"title": "Halloween 10",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/99a1127659c975822d7f0eff052c54b8.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/2b96582702253e5d88230621d9806ffd.png"
},
{
"title": "Halloween 11",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/b1f2bd4a4bab0c825367680b8f14580c.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/22eea4ddc2396a8459f8a82cc2fa41a7.png"
},
{
"title": "Halloween 12",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/00b800fbf34a148d2906aa01306e632f.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/02abab22836fea046ee1b121843aa1c4.png"
},
{
"title": "Halloween 13",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/407c2a04c6ba9eabffb2d48812676075.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/000d1d7c0026ddb269192cc8a3ed8a36.png"
},
{
"title": "Halloween 14",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/c0545680e4d81d2040f8ab5be1036221.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/c4d236b50c018013b856d0d6f813f431.png"
},
{
"title": "Halloween 15",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/40901854f4cf27e3f95e1c5e681d4e94.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/cfc812c4fa5879dc044dbf57848ec829.png"
},
{
"title": "Halloween 16",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/6acca311c1d0e69f0243a60ee966c763.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/9733f998ea9d592c09cf23dbc9da4218.png"
},
{
"title": "Halloween 17",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/09f13252d1db5a6b5294527c275fc9a7.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/32d4680f4d064475e6ca4424829d9fd6.png"
},
{
"title": "Halloween 18",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/9b80fc87cab236dccfdeaabe4770eb50.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/92ab558d70e01ff40d3b12ff27acc6b1.png"
},
{
"title": "Halloween 19",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/f3dfe8797d1a13a88f9544d3fdc54425.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/300e9423f50ff7b81b7de33d847733d6.png"
},
{
"title": "Halloween 20",
"mp3Url": "https://resource-sg-public.lux-ad.com/prank/44b966562ddc9d0a5ed2604bf8eac39a.mp3",
"preUrl": "https://resource-sg-public.lux-ad.com/prank/8e3f389ba05c4785961e9abd8a6809bf.png"
}
]
} }
] ]

View File

@ -22,14 +22,14 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class FunnyPrankSkin extends Application { public class FunnyPrankSkin extends Application {
public static final String DB_Name = "like_database"; public static final String DB_Name = "like_database_1";
public static final String Table_Name = "like_table"; public static final String Table_Name = "like_table";
public static final int DB_Version = 1; public static final int DB_Version = 1;
public static FunnyPrankSkin app; public static FunnyPrankSkin app;
private static Context context; private static Context context;
public static List<Mydata> myDataArrayList; public static List<Mydata> myDataArrayList;
private static boolean isinsert; private boolean isinsert;
private static final String PREFS_NAME = "MyPrefs"; private static final String PREFS_NAME = "MyPrefs1";
private static final String KEY_IS_INSERTED = "isinserted"; private static final String KEY_IS_INSERTED = "isinserted";
public static final String AD_BROADCAST = "on_success_action"; public static final String AD_BROADCAST = "on_success_action";
private static final String MAX_SDK = "6GTFERcq2m3KHo37uityeCg0kfcqx3iT31OJG_a5weBmXsslFg5NuR8mlBXEqZ3ExDdXIl16PTMg0442tdRaJs"; private static final String MAX_SDK = "6GTFERcq2m3KHo37uityeCg0kfcqx3iT31OJG_a5weBmXsslFg5NuR8mlBXEqZ3ExDdXIl16PTMg0442tdRaJs";
@ -52,10 +52,10 @@ public class FunnyPrankSkin extends Application {
Mytools.runIO(new Runnable() { Mytools.runIO(new Runnable() {
@Override @Override
public void run() { public void run() {
List<LikeData> otherdata = getOtherdata();
MydataBase.getInstance().likeDao().insertAll(getOtherdata()); MydataBase.getInstance().likeDao().insertAll(getOtherdata());
isinsert = true;
SharedPreferences.Editor editor = prefs.edit(); SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean(KEY_IS_INSERTED, isinsert); editor.putBoolean(KEY_IS_INSERTED, true);
editor.apply(); editor.apply();
} }
}); });
@ -71,7 +71,7 @@ public class FunnyPrankSkin extends Application {
public void run() { public void run() {
List<LikeData> allData = MydataBase.getInstance().likeDao().getAll(); List<LikeData> allData = MydataBase.getInstance().likeDao().getAll();
mydataList.clear(); mydataList.clear();
int[] indices = {0, 456, 111, 333, 222, 555, 444, 345, 234}; int[] indices = {0, 456, 111, 333, 222, 444, 123, 345, 234};
for (int index : indices) { for (int index : indices) {
if (index < allData.size()) { if (index < allData.size()) {

View File

@ -42,7 +42,7 @@ public class SettingActivity extends AppCompatActivity {
} }
}); });
binding.settingBack.setOnClickListener(v -> finish()); binding.settingBack.setOnClickListener(v -> finish());
binding.versionText.setText("1.0.2"); binding.versionText.setText("1.0.4");
binding.rate.setOnClickListener(new View.OnClickListener() { binding.rate.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

View File

@ -24,4 +24,8 @@ public abstract class MydataBase extends RoomDatabase {
} }
} }

View File

@ -8,6 +8,7 @@ import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.StaggeredGridLayoutManager; import androidx.recyclerview.widget.StaggeredGridLayoutManager;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -53,6 +54,7 @@ public class MainFragment extends Fragment {
MydataBase.getInstance().likeDao().livegetAll().observe(getViewLifecycleOwner(), new Observer<List<LikeData>>() { MydataBase.getInstance().likeDao().livegetAll().observe(getViewLifecycleOwner(), new Observer<List<LikeData>>() {
@Override @Override
public void onChanged(List<LikeData> list) { public void onChanged(List<LikeData> list) {
initView(chekData(list)); initView(chekData(list));
} }