diff --git a/app/build.gradle b/app/build.gradle index 6c10e80..0b2f9a9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -50,6 +50,7 @@ dependencies { implementation 'androidx.core:core-splashscreen:1.0.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.preference:preference:1.2.1' + implementation 'androidx.activity:activity:1.9.1' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.2.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ab7a3e3..62edc3e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -44,7 +44,9 @@ android:theme="@style/Base.Theme.Fogplix" android:usesCleartextTraffic="true" tools:targetApi="31"> - + onBackPressed()); + + binding.nestedScrollView.postDelayed(() -> { + binding.nestedScrollView.fullScroll(NestedScrollView.FOCUS_DOWN); + // Delay for 1 second then scroll back to the top + new Handler().postDelayed(() -> binding.nestedScrollView.fullScroll(NestedScrollView.FOCUS_UP), 1000); // 1000 milliseconds = 1 second + }, 1000); // Delay to ensure the layout is complete + + binding.sendViaBMAC.setOnClickListener(v -> new AlertDialog.Builder(DonateActivity.this) + .setTitle("Donate Us \uD83E\uDD7A") + .setMessage("Thank you for your support. We need your help to continue our project.") + .setIcon(AppCompatResources.getDrawable(this, R.drawable.donate_icon)) + .setPositiveButton("Continue", (dialog, which) -> { + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.bmc_donation_link)))); + dialog.dismiss(); + }) + .setNegativeButton("Cancel", (dialog, which) -> { + Toast.makeText(this, "We need your help.", Toast.LENGTH_SHORT).show(); + dialog.dismiss(); + }) + .create() + .show()); + + binding.sendViaUPI.setOnClickListener(v -> new AlertDialog.Builder(DonateActivity.this) + .setTitle("Donate Us \uD83E\uDD7A") + .setMessage("Thank you for your support. We need your help to continue our project.\n" + + "You can give us a very small donation through UPI.\n" + + "Our UPI Id: nura57764@axl") + .setIcon(AppCompatResources.getDrawable(this, R.drawable.donate_icon)) + .setPositiveButton("Copy UPI", (dialog, which) -> { + ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); + ClipData clip = ClipData.newPlainText("label", "nura57764@axl"); + if (clipboard != null) { + clipboard.setPrimaryClip(clip); + } + dialog.dismiss(); + }) + .setNegativeButton("Cancel", (dialog, which) -> { + Toast.makeText(this, "We need your help.", Toast.LENGTH_SHORT).show(); + dialog.dismiss(); + }) + .create() + .show()); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/fogplix/anime/activities/MainActivity.java b/app/src/main/java/com/fogplix/anime/activities/MainActivity.java index 2e66cdb..c5ae67b 100644 --- a/app/src/main/java/com/fogplix/anime/activities/MainActivity.java +++ b/app/src/main/java/com/fogplix/anime/activities/MainActivity.java @@ -87,7 +87,6 @@ protected void onCreate(Bundle savedInstanceState) { CustomMethods.checkForUpdateOnStartApp(this); CustomMethods.checkNewNotice(this, importantNoticeTV); - CustomMethods.checkPlayableServersStatus(this); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); @@ -178,6 +177,8 @@ private void navigationViewItemClickedActions(NavigationView navigationView) { drawerLayout.closeDrawer(GravityCompat.START); } }, 500); + } else if (item.getItemId() == R.id.donate_action) { + startActivity(new Intent(MainActivity.this, DonateActivity.class)); } else if (item.getItemId() == R.id.report_bug_action) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.official_telegram_group)))); } else if (item.getItemId() == R.id.share_action) { diff --git a/app/src/main/res/drawable/buy_me_coffee.png b/app/src/main/res/drawable/buy_me_coffee.png new file mode 100644 index 0000000..26bd303 Binary files /dev/null and b/app/src/main/res/drawable/buy_me_coffee.png differ diff --git a/app/src/main/res/drawable/donate_icon.xml b/app/src/main/res/drawable/donate_icon.xml new file mode 100644 index 0000000..5b3974e --- /dev/null +++ b/app/src/main/res/drawable/donate_icon.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/round_corner.xml b/app/src/main/res/drawable/round_corner.xml index 9ea1013..8626809 100644 --- a/app/src/main/res/drawable/round_corner.xml +++ b/app/src/main/res/drawable/round_corner.xml @@ -3,6 +3,8 @@ - + android:topLeftRadius="15dp" + android:topRightRadius="15dp" + android:bottomLeftRadius="15dp" + android:bottomRightRadius="15dp" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/upi_send_button.png b/app/src/main/res/drawable/upi_send_button.png new file mode 100644 index 0000000..2ed57ea Binary files /dev/null and b/app/src/main/res/drawable/upi_send_button.png differ diff --git a/app/src/main/res/layout/activity_donate.xml b/app/src/main/res/layout/activity_donate.xml new file mode 100644 index 0000000..6126f65 --- /dev/null +++ b/app/src/main/res/layout/activity_donate.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/nav_drawer_menu.xml b/app/src/main/res/menu/nav_drawer_menu.xml index 186a594..fe39282 100644 --- a/app/src/main/res/menu/nav_drawer_menu.xml +++ b/app/src/main/res/menu/nav_drawer_menu.xml @@ -27,6 +27,11 @@ android:title="Support Us" tools:ignore="HardcodedText"> + + Now you are able to browse Fogplix Anime through proxy Use proxy to bypass your ISP (Internet Service Provider) blockage + Dear Anime Fans,\n\nWe hope you’re enjoying Fogplix Anime! To keep this free service running, we rely on a VPS server that costs us $5 each month. Since we don’t earn from this, we humbly ask for your support.\n\nAny small donation would be greatly appreciated and would help us continue offering this service. Thank you so much for being part of our community and for considering a contribution.\n\nWith sincere gratitude,\nThe Fogplix Anime Team + Support Fogplix Anime - Your Free Anime Streaming Service! + https://buymeacoffee.com/mrsparvinry + \ No newline at end of file