Views

The Android PoqSDK provides UI components to help you speed up your development equipping you with common Android patterns and eCommerce UI components. The Poq UI components are fully customisable, some of them allowing anchor points to incorporate your custom views, and they use App Styling internally to adapt automatically to your app style. The available Poq UI components are:

Anchor points

Anchor points is a pattern used by the Poq UI components to allow you to add views to a component without replacing its layout or customising its internal behaviour. Via the predefined anchor points you will be able to add a view to a Poq UI component to a specific point and the component will adapt to fit your new view. To add a view to a Poq UI component you need to:

  1. Add the Poq UI component to your layout.
  2. Add your new view as a child of the component.
  3. Use the property app:anchorTo= to place your new view on its right place.
    <PoqUIComponent
    android:layout_width="..."
    android:layout_height="...">
    <YourExtraView
    android:layout_width="..."
    android:layout_height="..."
    app:anchorTo="topEnd" />
    </PoqUIComponent>
The app:anchorTo= is not mandatory, you can use the regular Android properties to place your view as a child without an anchor point if there is not one that fit your purposes but bear in mind that the component will not adapt.