Class PlainTextControl
java.lang.Object
com.samsung.android.sdk.samsungpay.v2.payment.sheet.SheetControl
com.samsung.android.sdk.samsungpay.v2.payment.sheet.PlainTextControl
- All Implemented Interfaces:
android.os.Parcelable
This class provides PlainTextControl on custom payment sheet.
This control is used for displaying 2-line text with title or 1-line text without title.
This control is used for displaying 2-line text with title or 1-line text without title.
- Since:
- API Level 1.3
-
Nested Class Summary
Nested classes/interfaces inherited from class com.samsung.android.sdk.samsungpay.v2.payment.sheet.SheetControl
SheetControl.Controltype
-
Field Summary
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
-
Method Summary
Methods inherited from class com.samsung.android.sdk.samsungpay.v2.payment.sheet.SheetControl
getControlId, getControltype
-
Constructor Details
-
PlainTextControl
Constructor to create PlainTextControl.
// Construct PlainText for 2-line text. PlainTextControl plainTextControl1 = new PlainTextControl("plainText1"); plainTextControl1.setText("Plain1 title", "This is example of PlainTextControl1."); // Construct PlainText for 1-line text. PlainTextControl plainTextControl2 = new PlainTextControl("plainText2"); plainTextControl2.setText(null, "This is example of PlainTextControl2.");
- Parameters:
controlId
- Unique ID to represent the PlainTextControl. This ID is used to compare and identify the other SheetControls.- Throws:
IllegalArgumentException
- Thrown if controlId is empty.- Since:
- API Level 1.3
-
-
Method Details
-
setText
API to set the title and text.- Parameters:
title
- Title to set.text
- Text to set.- Throws:
NullPointerException
- Thrown if the text is null.- Since:
- API Level 1.3
-
getText
API to get text.- Returns:
- Text to display.
- Since:
- API Level 1.3
-
getTitle
API to get title.- Returns:
- Title for PlainTextControl.
- Since:
- API Level 1.3
-
Samsung Electronics.
Samsung Pay SDK 2.19.00 - Jun 12 2024