Use Interface X Components for Android library
Use Interface X Components for Android library
The Interface X Components library includes pre-built Android views to easily load and display data from the Empathy Search API.
The library builds on top of the Interface X Types library (x-types). It provides ViewModels for each view to easily populate with data and handle input events. These Jetpack ViewModels (opens new window) are used to easily connect to the search adapter (x-adapter
) to fetch data and perform actions, allowing the components to retain data across configuration changes.
interact
For more information on the dependencies of this library, see Integrate Interface X Components for Android.
Customize the X Components
The X Components offer style customization options via XML attributes and also with StyleCustomizer
API at runtime.
Also, it is possible to perform functional customization creating a custom ViewHolder.
And of course, it is possible to create a specific repository to connect to any endpoint to retrieve the data.
Let's see this through the example of a specific component:
- Customizing the Related Tags
warning
If you use the Interface X Components for Android library, bear in mind that it uses Material elements. Make sure that you use a Material theme (opens new window) in your application before adding the components. For more information, see Install the project dependencies.