Nutrient 2.1 migration guide
Prior to version 2.1, there were two different Nutrient activities: PSPDFActivity
and PSPDFAppCompatActivity
. Each of these had two different base classes, FragmentActivity
(opens in a new tab) and AppCompatActivity
(opens in a new tab), respectively. Version 2.1 simplifies activities by only having a single PSPDFActivity
that extends AppCompatActivity
(opens in a new tab).
Below you’ll find the steps for migrating your app to Nutrient Android SDK 2.1.
Replace
pspdfkit-2.0.x.aar
withpspdfkit-2.1.aar
.If you have a custom Nutrient activity, let it extend
com.pspdfkit.ui.PSPDFActivity
.Inside the
AndroidManifest.xml
:- Use your custom activity or the default
com.pspdfkit.ui.PSPDFActivity
. - Use an activity theme that extends
Theme.AppCompat
(important!).
- Use your custom activity or the default
The manifest entry should look similar to this:
<activity android:name="com.pspdfkit.ui.PSPDFActivity" android:theme="@style/Theme.AppCompat.Light.DarkActionBar" android:windowSoftInputMode="adjustNothing" />