Skip to content

Commit

Permalink
Enhancement Feature
Browse files Browse the repository at this point in the history
The merchant can now configure the scanner to be shown or hide
  • Loading branch information
AhlaamK-tap committed May 24, 2023
1 parent 4361ed9 commit 30e9a19
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# CHANGELOG
[3.17.0] - 2023-05-24
### Enhancement Feature:
- The merchant can now configure the scanner to be shown or hide
### Impact on existing integrations:
- The update does not impact existing integrations.
### Recommended changes for existing integrations before updating:
- None.
[3.16.4] - 2023-05-22
### Hot Fix:
- bug fix for text
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ import company.tap.gosellapi.GoSellSDK
// change scan icon
.setScanIconDrawable(getResources().getDrawable(R.drawable.btn_card_scanner_normal)) // **Optional**

//Show or hide the scanner
.setCardScannerIconVisible(true) // **Optional**
// setup pay button selector [ background - round corner ]
.setPayButtonResourceId(R.drawable.btn_pay_selector)

Expand Down Expand Up @@ -434,7 +436,9 @@ import company.tap.gosellapi.GoSellSDK

// change scan icon
.setScanIconDrawable(getResources().getDrawable(R.drawable.btn_card_scanner_normal)) // **Optional**


//Show or hide the scanner
.setCardScannerIconVisible(true) // **Optional**
// setup pay button selector [ background - round corner ]
.setPayButtonResourceId(R.drawable.btn_pay_selector)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ private void configureSDKThemeObject() {
.setSaveCardSwitchOnTrackTint(getResources().getColor(R.color.vibrant_green_pressed))

.setScanIconDrawable(getResources().getDrawable(R.drawable.btn_card_scanner_normal))
.setCardScannerIconVisible(true) // **Optional**

.setPayButtonResourceId(R.drawable.btn_pay_selector) //btn_pay_merchant_selector
.setPayButtonFont(Typeface.createFromAsset(getAssets(), "fonts/roboto_light.ttf"))
Expand All @@ -193,7 +194,8 @@ private void configureSDKThemeObject() {
.setPayButtonTextSize(14)
.setPayButtonLoaderVisible(true)
.setPayButtonSecurityIconVisible(true)
.setPayButtonText("Tokenize Text value") // **Optional**
// .setPayButtonText("Tokenize Text value") // **Optional**



// setup dialog textcolor and textsize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ public void afterTextChanged(Editable s) {

cardScannerButton = itemView.findViewById(R.id.cardScannerButton);

if(ThemeObject.getInstance().isSetCardScannerIconVisible()) cardScannerButton.setVisibility(View.VISIBLE);
else cardScannerButton.setVisibility(View.GONE);



/////////////////////////////////////////////////// CARD EXPIRATION_DATE START ///////////////////////////////////////////////////////
expirationDateField = itemView.findViewById(R.id.expirationDateField);
// enable Expiration date dialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class ThemeObject {
private int saveCardSwitchOffTrackTint;
private int saveCardSwitchOnTrackTint;
private Drawable scanIconDrawable;

private boolean cardScannerIconVisible=true;

/**
* Tap Button
Expand Down Expand Up @@ -346,6 +346,14 @@ public ThemeObject setPayButtonSecurityIconVisible(boolean payButtSecurityIconVi
return this;
}

/**
* pay button view or hide scanner
* @param cardScannerIconVisible
*/
public ThemeObject setCardScannerIconVisible(boolean cardScannerIconVisible) {
this.cardScannerIconVisible = cardScannerIconVisible;
return this;
}
/**
*
* @param payButtLoaderVisible
Expand Down Expand Up @@ -573,6 +581,13 @@ public boolean isPayButtSecurityIconVisible() {
return this.payButtSecurityIconVisible;
}

/**
* @return pay button security icon visible
*/
public boolean isSetCardScannerIconVisible() {
return this.cardScannerIconVisible;
}

/**
*
* @return
Expand Down

0 comments on commit 30e9a19

Please sign in to comment.