-
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.
Merge pull request #129 from wangdaliu/promp-description
support description on Accessible mode
- Loading branch information
Showing
13 changed files
with
232 additions
and
35 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; | ||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
affirm/src/main/java/com/affirm/android/HtmlPromotionCallbackV2.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,11 @@ | ||
package com.affirm.android; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.affirm.android.exception.AffirmException; | ||
|
||
public interface HtmlPromotionCallbackV2 { | ||
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; | ||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
affirm/src/main/java/com/affirm/android/PromotionCallbackV2.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,11 @@ | ||
package com.affirm.android; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.affirm.android.exception.AffirmException; | ||
|
||
public interface PromotionCallbackV2 { | ||
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
Oops, something went wrong.