Skip to content

Commit 5de9a5e

Browse files
authored
Merge pull request #290 from FredDominant/bug/fix-text-invisible-on-modal
add theme for payment confirmation dialogs
2 parents cdb23ce + f125661 commit 5de9a5e

File tree

19 files changed

+52
-19
lines changed

19 files changed

+52
-19
lines changed

ChargeVerificationUtils.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This module helps you handle charge verification when not using the default drop
1313
**Step 2.** Add the dependency for the utils library
1414

1515
dependencies {
16-
implementation 'com.github.Flutterwave.rave-android:rave_utils:2.1.38'
16+
implementation 'com.github.Flutterwave.rave-android:rave_utils:2.1.39'
1717
}
1818

1919
**Step 2.** In your payment activity or fragment, create an instance of the `RaveVerificationUtils` class

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ The payment methods currently supported are Cards, USSD, Mpesa, GH Mobile Money,
3535
If you want to use the default Drop In UI, add the `rave-android` module dependency
3636
```groovy
3737
dependencies {
38-
implementation 'com.github.flutterwave.rave-android:rave_android:2.1.38'
38+
implementation 'com.github.flutterwave.rave-android:rave_android:2.1.39'
3939
}
4040
```
4141

4242
if you are not interested in our default UI and you want to use yours and only want to interact with our core sdk, use the `rave_presentation` module
4343

4444
```groovy
4545
dependencies {
46-
implementation 'com.github.Flutterwave.rave-android:rave_presentation:2.1.38'
46+
implementation 'com.github.Flutterwave.rave-android:rave_presentation:2.1.39'
4747
}
4848
```
4949
**Step 3.** Add the `INTERNET` permission to your android manifest

app/src/main/res/values/styles.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<item name="PaymentTileStyle">@style/newPaymentTileStyle</item>
2222
<item name="PaymentTileTextStyle">@style/newPaymentTileTextStyle</item>
2323
<item name="PaymentTileDividerStyle">@style/newPaymentTileDividerStyle</item>
24+
<item name="RaveDialogStyle">@style/RaveDialogStyle</item>
2425
</style>
2526

2627
<style name="newPaymentTileTextStyle">
@@ -54,4 +55,18 @@
5455
<item name="android:textColor">#bcaaa4</item>
5556
</style>
5657

58+
<!-- Dialog Theme -->
59+
<style name="RaveDialogStyle" parent="ThemeOverlay.AppCompat.Dialog.Alert">
60+
<item name="buttonBarNegativeButtonStyle">@style/RaveDialogNegativeButtonStyle</item>
61+
<item name="buttonBarPositiveButtonStyle">@style/RaveDialogPositiveButtonStyle</item>
62+
</style>
63+
64+
<style name="RaveDialogNegativeButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
65+
<item name="android:textColor">#9C27B0</item>
66+
</style>
67+
68+
<style name="RaveDialogPositiveButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
69+
<item name="android:textColor">#039be5</item>
70+
</style>
71+
5772
</resources>

rave_android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion 15
1010
targetSdkVersion 30
1111
versionCode 1
12-
versionName "2.1.38"
12+
versionName "2.1.39"
1313

1414
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1515

rave_android/build/generated/source/buildConfig/debug/com/flutterwave/raveandroid/BuildConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ public final class BuildConfig {
99
public static final String BUILD_TYPE = "debug";
1010
public static final String FLAVOR = "";
1111
public static final int VERSION_CODE = 1;
12-
public static final String VERSION_NAME = "2.1.37";
12+
public static final String VERSION_NAME = "2.1.38";
1313
}

rave_android/src/main/java/com/flutterwave/raveandroid/account/AccountFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public void showFieldError(int viewID, String message, Class<?> viewType) {
262262
public void onTransactionFeeRetrieved(String chargeAmount, final Payload payload, String fee) {
263263

264264
if (getActivity() != null) {
265-
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
265+
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.RaveDialogStyle);
266266
builder.setMessage(getResources().getString(R.string.charge) + " " + chargeAmount + " " + ravePayInitializer.getCurrency() + getResources().getString(R.string.askToContinue));
267267
builder.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
268268
@Override

rave_android/src/main/java/com/flutterwave/raveandroid/ach/AchFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void onClick(View view) {
110110
@Override
111111
public void showFee(final String authUrl, final String flwRef, final String charge_amount, final String currency) {
112112

113-
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
113+
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.RaveDialogStyle);
114114
builder.setMessage(getResources().getString(R.string.charge) + " " + charge_amount + " " + currency + getResources().getString(R.string.askToContinue));
115115
builder.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
116116
@Override

rave_android/src/main/java/com/flutterwave/raveandroid/barter/BarterFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public void showToast(String message) {
188188
public void onTransactionFeeFetched(String charge_amount, final Payload payload, String fee) {
189189
if (getActivity() != null) {
190190

191-
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
191+
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.RaveDialogStyle);
192192
builder.setMessage(getResources().getString(R.string.charge) + " " + charge_amount + ravePayInitializer.getCurrency() + getResources().getString(R.string.askToContinue));
193193
builder.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
194194
@Override

rave_android/src/main/java/com/flutterwave/raveandroid/card/CardFragment.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import com.flutterwave.raveandroid.SwipeToDeleteCallback;
3838
import com.flutterwave.raveandroid.ViewObject;
3939
import com.flutterwave.raveandroid.card.savedcards.SavedCardRecyclerAdapter;
40-
import com.flutterwave.raveandroid.card.savedcards.SavedCardsActivity;
4140
import com.flutterwave.raveandroid.card.savedcards.SavedCardsFragment;
4241
import com.flutterwave.raveandroid.data.EmailObfuscator;
4342
import com.flutterwave.raveandroid.data.PhoneNumberObfuscator;
@@ -737,13 +736,13 @@ public void onFetchFeeError(String errorMessage) {
737736
}
738737

739738
/**
740-
* @param chargeAmount = Total amount to be charged (transaction fees incuded)
739+
* @param chargeAmount = Total amount to be charged (transaction fees included)
741740
* @param payload = Object that contains the payment info (Contains card payment details)
742741
*/
743742
@Override
744743
public void onTransactionFeeFetched(String chargeAmount, final Payload payload, String fee) {
745744
if (getActivity() != null) {
746-
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
745+
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.RaveDialogStyle);
747746
builder.setMessage(getResources().getString(R.string.charge) + " " + chargeAmount + " " + ravePayInitializer.getCurrency() + getResources().getString(R.string.askToContinue));
748747
builder.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
749748
@Override

rave_android/src/main/java/com/flutterwave/raveandroid/francMobileMoney/FrancMobileMoneyFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void onValidationSuccessful(HashMap<String, ViewObject> dataHashMap) {
229229
public void onTransactionFeeRetrieved(String charge_amount, final Payload payload, String fee) {
230230
if (getActivity() != null) {
231231

232-
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
232+
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.RaveDialogStyle);
233233
builder.setMessage(getResources().getString(R.string.charge) + " " + charge_amount + " " + ravePayInitializer.getCurrency() + getResources().getString(R.string.askToContinue));
234234
builder.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
235235
@Override

0 commit comments

Comments
 (0)