Skip to content

Together, we can make a difference in the lives of those affected by natural disasters and help to build a better tomorrow.

License

Notifications You must be signed in to change notification settings

mobven/AndroQuake-SDK

Repository files navigation

AndroQuake-SDK

AndroQuake-SDK to show donation page easily in your app.

Examples

UI UI

Requirements

  • Android Api 21+
  • MaterialComponents Theme

Download

Step 1. Add the JitPack repository to your build file

allprojects {
    repositories {
	    ...
	    maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
    implementation 'com.github.mobven:AndroQuake-SDK:1.0.2'
}

Usage

Default Donation

AndroQuake can be initialized through, which has default title and message those are presented in the screenshot above.

// call this constructor wherever you want providing context
Donation.Builder(this).build()

Custom title, message and logo

If you want to use custom logo, title and description, you can use below builder.

Donation.Builder(this)
  .logo(R.drawable.my_custom_logo)
  .title("Donate")
  .description("Donation lorem impsum...")
  .build()

Spanned title and message, and custom logo

If you want to show fancy title and description, you can use our DonationText wrapper to make a spannable string.

Donation.Builder(this)
  .logo(R.drawable.my_custom_logo)
  .titleSpan(DonationText(SpannableString.valueOf("Donate")))
  .descriptionSpan(DonationText(SpannableString.valueOf("Donation lorem impsum...")))
  .build()

Custom Action Buttons

By default it has, AHBAP, AFAD and Turk Kizilayi buttons. If you want to add custom buttons, you can use our DonateButton to make a your button.

Donation.Builder(this)
  .logo(R.drawable.my_custom_logo)
  .titleSpan(DonationText(SpannableString.valueOf("Donate")))
  .descriptionSpan(DonationText(SpannableString.valueOf("Donation lorem impsum...")))
  .donationButtons(
    mutableListOf(
      DonateButton(
        icon = R.drawable.logo,
        link = "https://ahbap.org/bagisci-ol",
        strokeColor = R.color.color_green_ahbap,
        backgroundColor = R.color.color_bg_ahbap
    ),
    DonateButton(
        icon = R.drawable.logo,
        link = "https://www.afad.gov.tr/depremkampanyasi2",
        strokeColor = R.color.color_green_afad,
        backgroundColor = R.color.color_bg_afad
    ),
    DonateButton(
       label = "BİREYSEL BAĞIŞ",
       link = "#bagisyap"
    )
 )
).build()

Force Dark-Mode Support

By default this activity supports day/night mode natively. If you want to make to show only dark activity, you can use following method.

.forceDarkMode(true) // force dark mode configuration

About

Together, we can make a difference in the lives of those affected by natural disasters and help to build a better tomorrow.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages