AndroQuake-SDK to show donation page easily in your app.
- Android Api 21+
- MaterialComponents Theme
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.mobven:AndroQuake-SDK:1.0.2'
}
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()
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()
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()
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()
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