Customize UI via Source (uiextensions_src)
When you need to rebuild or replace UI implementation rather than toggle built-in UI, import the uiextensions_src source project for deep customization.
NOTE
- This section covers UI Extensions UI customization via
uiextensions_src. - For scanning and other separate modules, use the same project pattern; resource paths follow each module.
- This section uses
samples/viewer_ctrl_demoas a minimal example: import source → change layouts/resources → run. The same approach applies to your app.
Step 1: Add uiextensions_src to the Project
Prerequisites
uiextensions_srcdepends onFoxitRDK.aar. Keep the default SDK layout (both underlibs). If you change paths, updateuiextensions_srcreferences toFoxitRDK.aar.viewer_ctrl_demoalready includesFoxitRDK.aar; adduiextensions_srcand switch dependencies.
1.1 Include Source in settings.gradle
kotlin
include ':app'
include ':uiextensions_src'
project(':uiextensions_src').projectDir = new File('../../libs/uiextensions_src/')1.2 Switch Dependencies in app/build.gradle
Use uiextensions_src and remove or comment FoxitRDKUIExtensions.aar:
kotlin
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation (name: 'FoxitRDK', ext: 'aar')
// implementation(name:'FoxitRDKUIExtensions', ext:'aar')
implementation project(":uiextensions_src")
implementation 'com.edmodo:cropper:1.0.1'
implementation 'com.microsoft.identity.client:msal:2.2.0'
implementation(name: 'RMSSDK-4.2-release', ext: 'aar')
implementation(name: 'rms-sdk-ui', ext: 'aar')
implementation 'org.bouncycastle:bcpkix-jdk15on:1.60'
implementation 'org.bouncycastle:bcprov-jdk15on:1.60'
// RxJava
implementation "io.reactivex.rxjava2:rxjava:2.2.16"
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
}Step 2: Change Layouts and Resources (Example: Search Panel Icon)
A common approach: edit layout XML and replace drawables.
Find the icon resource (e.g. ic_search_list) in uiextensions_src/src/main/res/layout/search_layout.xml and replace the drawable (e.g. copy ic_search_next.xml over ic_search_list.xml).
Recommended steps:
1) Open the layout
- Open
uiextensions_src/src/main/res/layout/search_layout.xmlin Android Studio. - Select the button in Layout Editor or search for
ic_search_list.
- Open
2) Confirm resource name
- Check
android:src,app:srcCompat,android:background, etc. - Note the resource name (e.g.
ic_search_list).
- Check
3) Replace and verify
- Place a same-name asset under
uiextensions_src/src/main/res/drawable*. - Rebuild, run the demo, and open the search panel to confirm.
- Place a same-name asset under
NOTE
This minimal example shows how source customization works. Modify layouts, resources, and logic in uiextensions_src to match your product UI.