Add the dependency to the build.gradle file of your app, replace X.X.X with the latest available version.
build.gradle
X.X.X
implementation 'com.github.nextcloud.android-common:ui:X.X.X'
See Sample app → UiFragment for a basic usage sample.
Sample
UiFragment