-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support description on Accessible mode
- Loading branch information
Showing
11 changed files
with
144 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
affirm/src/main/java/com/affirm/android/HtmlPromotion.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.affirm.android; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
public class HtmlPromotion { | ||
@NonNull | ||
private String htmlPromo; | ||
@NonNull | ||
private String description; | ||
private boolean showPrequal; | ||
|
||
public HtmlPromotion(@NonNull String htmlPromo, | ||
@NonNull String description, | ||
boolean showPrequal) { | ||
this.htmlPromo = htmlPromo; | ||
this.description = description; | ||
this.showPrequal = showPrequal; | ||
} | ||
|
||
@NonNull | ||
public String getHtmlPromo() { | ||
return htmlPromo; | ||
} | ||
|
||
public void setHtmlPromo(@NonNull String htmlPromo) { | ||
this.htmlPromo = htmlPromo; | ||
} | ||
|
||
@NonNull | ||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(@NonNull String description) { | ||
this.description = description; | ||
} | ||
|
||
public boolean isShowPrequal() { | ||
return showPrequal; | ||
} | ||
|
||
public void setShowPrequal(boolean showPrequal) { | ||
this.showPrequal = showPrequal; | ||
} | ||
} |
5 changes: 2 additions & 3 deletions
5
affirm/src/main/java/com/affirm/android/HtmlPromotionCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
package com.affirm.android; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
|
||
import com.affirm.android.exception.AffirmException; | ||
|
||
public interface HtmlPromotionCallback { | ||
void onSuccess(@Nullable String htmlPromo, boolean showPrequal); | ||
void onSuccess(HtmlPromotion promotion); | ||
|
||
void onFailure(@NonNull AffirmException exception); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.affirm.android; | ||
|
||
import android.text.SpannableString; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
public class Promotion { | ||
@NonNull | ||
private SpannableString spannableString; | ||
@NonNull | ||
private String description; | ||
private boolean showPrequal; | ||
|
||
public Promotion(@NonNull SpannableString spannableString, | ||
@NonNull String description, | ||
boolean showPrequal) { | ||
this.spannableString = spannableString; | ||
this.description = description; | ||
this.showPrequal = showPrequal; | ||
} | ||
|
||
@NonNull | ||
public SpannableString getSpannableString() { | ||
return spannableString; | ||
} | ||
|
||
public void setSpannableString(@NonNull SpannableString spannableString) { | ||
this.spannableString = spannableString; | ||
} | ||
|
||
@NonNull | ||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(@NonNull String description) { | ||
this.description = description; | ||
} | ||
|
||
public boolean isShowPrequal() { | ||
return showPrequal; | ||
} | ||
|
||
public void setShowPrequal(boolean showPrequal) { | ||
this.showPrequal = showPrequal; | ||
} | ||
} |
5 changes: 1 addition & 4 deletions
5
affirm/src/main/java/com/affirm/android/PromotionCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
package com.affirm.android; | ||
|
||
import android.text.SpannableString; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
|
||
import com.affirm.android.exception.AffirmException; | ||
|
||
public interface PromotionCallback { | ||
void onSuccess(@Nullable SpannableString spannableString, boolean showPrequal); | ||
void onSuccess(@NonNull Promotion promotion); | ||
|
||
void onFailure(@NonNull AffirmException exception); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters