public abstract class InputDetailsGroupLayout extends LinearLayout implements ValidationChanger, ValidationChanger.ValidationChangeListener
ValidationChanger.ValidationChangeListener
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedHashMap<java.lang.String,InputDetailController> |
mControllerMap |
Constructor and Description |
---|
InputDetailsGroupLayout(Context context) |
InputDetailsGroupLayout(Context context,
AttributeSet attrs) |
InputDetailsGroupLayout(Context context,
AttributeSet attrs,
int defStyleAttr) |
Modifier and Type | Method and Description |
---|---|
void |
addValidationChangeListener(ValidationChanger.ValidationChangeListener listener)
Adds a
ValidationChanger.ValidationChangeListener to be notified when the valid state of this form has changed. |
FieldSetConfiguration.FieldVisibility |
getFormVisibility() |
protected static java.lang.String |
getIdFromItemSpinner(Spinner spinner) |
protected TextView |
getReadOnlyDetails() |
protected static java.lang.String |
getTextFromInput(TextView editText) |
boolean |
isValid()
Checks if the details input from the user are valid and ready to process the payment.
|
protected abstract void |
mapChildInputDetails(java.util.List<InputDetail> childDetails) |
protected void |
mapEditTextWithValidator(EditText editText,
ViewGroup layout,
InputDetail childDetail,
ValidationCheckDelegate detailValidator) |
protected void |
mapSimpleEditTextDetail(EditText editText,
ViewGroup layout,
InputDetail childDetail) |
protected void |
notifyValidationListeners(boolean isValid) |
protected void |
onFinishInflate() |
void |
onValidationChanged(boolean isValid)
The combined validation of the input details from this group has changed.
|
protected abstract void |
parseReadOnlyDetails(java.util.List<InputDetail> childDetails) |
void |
populateInputDetailGroup(InputDetail inputDetailGroup)
Uses a base
InputDetail that has a group of child InputDetails to populate the group view. |
protected static void |
populateSpinner(Spinner spinner,
InputDetail inputDetail) |
void |
removeValidationChangeListener(ValidationChanger.ValidationChangeListener listener)
Removes a
ValidationChanger.ValidationChangeListener . |
protected void |
setFormVisibility(InputDetail inputDetailGroup) |
void |
setTitle(int titleResource)
Sets the text for the title view of this group.
|
protected java.util.LinkedHashMap<java.lang.String,InputDetailController> mControllerMap
public InputDetailsGroupLayout(Context context)
public InputDetailsGroupLayout(Context context, AttributeSet attrs)
public InputDetailsGroupLayout(Context context, AttributeSet attrs, int defStyleAttr)
protected void onFinishInflate()
public void setTitle(int titleResource)
titleResource
- The resource int of the string to be set.protected TextView getReadOnlyDetails()
public void populateInputDetailGroup(InputDetail inputDetailGroup) throws CheckoutException
InputDetail
that has a group of child InputDetails to populate the group view.inputDetailGroup
- The parent InputDetail with a sub-group of other InputDetailsCheckoutException
- a number of exceptions can happen while parsing the data.protected abstract void mapChildInputDetails(java.util.List<InputDetail> childDetails) throws CheckoutException
CheckoutException
protected abstract void parseReadOnlyDetails(java.util.List<InputDetail> childDetails) throws CheckoutException
CheckoutException
public boolean isValid()
ValidationChanger
isValid
in interface ValidationChanger
public void addValidationChangeListener(ValidationChanger.ValidationChangeListener listener)
ValidationChanger
ValidationChanger.ValidationChangeListener
to be notified when the valid state of this form has changed.addValidationChangeListener
in interface ValidationChanger
listener
- The listener.public void removeValidationChangeListener(ValidationChanger.ValidationChangeListener listener)
ValidationChanger
ValidationChanger.ValidationChangeListener
.removeValidationChangeListener
in interface ValidationChanger
listener
- The listener to be removed.protected void notifyValidationListeners(boolean isValid)
public void onValidationChanged(boolean isValid)
ValidationChanger.ValidationChangeListener
onValidationChanged
in interface ValidationChanger.ValidationChangeListener
isValid
- If the current set of inputs is valid or not.public FieldSetConfiguration.FieldVisibility getFormVisibility()
protected void setFormVisibility(InputDetail inputDetailGroup) throws CheckoutException
CheckoutException
protected void mapSimpleEditTextDetail(EditText editText, ViewGroup layout, InputDetail childDetail)
protected void mapEditTextWithValidator(EditText editText, ViewGroup layout, InputDetail childDetail, ValidationCheckDelegate detailValidator)
protected static void populateSpinner(Spinner spinner, InputDetail inputDetail)
protected static java.lang.String getTextFromInput(TextView editText)
protected static java.lang.String getIdFromItemSpinner(Spinner spinner)