Skip to content

Commit 5ebbb43

Browse files
committed
Show preauth and saved card switch only for card payments
1 parent 10bcba2 commit 5ebbb43

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/src/main/java/com/flutterwave/rave_android/MainActivity.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,19 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
162162
}
163163
});
164164

165+
cardSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
166+
@Override
167+
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
168+
if (b) {
169+
isPreAuthSwitch.setVisibility(View.VISIBLE);
170+
allowSavedCardsSwitch.setVisibility(View.VISIBLE);
171+
} else {
172+
isPreAuthSwitch.setVisibility(View.GONE);
173+
allowSavedCardsSwitch.setVisibility(View.GONE);
174+
}
175+
}
176+
});
177+
165178
isPermanentAccountSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
166179
@Override
167180
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {

0 commit comments

Comments
 (0)