Replace views

When you need to customise a view, you will need to replace its layout. This is different depending on if the layout is declared with or without an alias. Usually, Activities and Fragments are declared without an alias, while the rest of the views have one. You should consult the features section to confirm this and check the name of the view you are trying to replace.

Replace views without an alias

When a view is declared without an alias, you need to:

  1. Create a new xml file for your layout.
  2. The name of your new file needs to match the name of the PoqSDK layout that you want to replace.

Replace views with an alias

When a view is declared with an alias, you need to:

  1. Create a new xml file for your layout.
  2. The name of your new file needs to differ from the name of the PoqSDK layout that you want to replace.
  3. Create an xml property matching the alias that you want to replace pointing to your new layout.
    <resources>
    <item name="aliasLayoutYouWantToReplace" type="layout">@layout/your_layout_file</item>
    </resources>