public final class HierarchicalPaymentContainerEnlarger extends java.lang.Object implements PaymentContainerEnlarger
PaymentContainerEnlarger traverses the view hierarchy up until the
Activity's base container has been reached and remove all views along the hierarchy.
The result is that the payment container spans over the whole screen. During restoring all views will be set back to the visibility they had before and also the size will be the same as before.
This implementation of a PaymentContainerEnlarger is quit aggressive and may lead to
some issues in particular cases. As such this is a good default but a custom implementation may
achieve better results.
| Constructor and Description |
|---|
HierarchicalPaymentContainerEnlarger(android.view.View viewToEnlarge,
android.app.Activity activity) |
HierarchicalPaymentContainerEnlarger(android.view.View viewToEnlarge,
android.view.View container) |
| Modifier and Type | Method and Description |
|---|---|
void |
enlarge()
This method should create more space.
|
void |
restore()
This method should restore the situation as it was before calling
PaymentContainerEnlarger.enlarge() has been
invoked. |
public HierarchicalPaymentContainerEnlarger(android.view.View viewToEnlarge,
android.app.Activity activity)
public HierarchicalPaymentContainerEnlarger(android.view.View viewToEnlarge,
android.view.View container)
public void enlarge()
PaymentContainerEnlargerThis method may be called from a background process. This means any changes applied on the view hierarchy has to be run in the main loop.
The method may also be called multiple times and in parallel. As such the implementor has to consider some kind of locking strategy.
The implementor has also to consider that the call of this method and PaymentContainerEnlarger.restore()
occurs in parallel and as such the transition between those two states have to be
atomic.
enlarge in interface PaymentContainerEnlargerpublic void restore()
PaymentContainerEnlargerPaymentContainerEnlarger.enlarge() has been
invoked.
This method may be called from a background process. This means any changes applied on the view hierarchy has to be run in the main loop.
The method may also be called multiple times and in parallel. As such the implementor has to consider some kind of locking strategy.
restore in interface PaymentContainerEnlarger