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

public class PlainTextControl extends SheetControl implements 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.
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

    Nested classes/interfaces inherited from interface android.os.Parcelable

    android.os.Parcelable.ClassLoaderCreator<T extends Object>, android.os.Parcelable.Creator<T extends Object>
  • Field Summary

    Fields inherited from interface android.os.Parcelable

    CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor to create PlainTextControl.
  • Method Summary

    Modifier and Type
    Method
    Description
    API to get text.
    API to get title.
    void
    setText(String title, String text)
    API to set the title and text.

    Methods inherited from class com.samsung.android.sdk.samsungpay.v2.payment.sheet.SheetControl

    getControlId, getControltype

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlainTextControl

      public PlainTextControl(String controlId)
      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

      public void setText(String title, String text)
      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

      public String getText()
      API to get text.
      Returns:
      Text to display.
      Since:
      API Level 1.3
    • getTitle

      public String getTitle()
      API to get title.
      Returns:
      Title for PlainTextControl.
      Since:
      API Level 1.3