Knowledge Base - Migrate RadaeePDF PDF ViewLib to AndroidX

There is a refactoring command integrated in Android Studio.
Refactor -> Migrate to AndroidX, that should handle all of this automatically.

 

Alternatively, if you need to do this manually,

There are a few imports that need to be updated for ViewLib to be compiled in an androidx project:

substitute
import android.support.annotation.Nullable;

with:
import androidx.annotation.Nullable;

which are used in classes
com/radaee/annotui/UILStyleButton.java
com/radaee/annotui/UILStyleView.java
com/radaee/annotui/UISignView.java
com/radaee/reader/GLCanvas.java
com/radaee/util/CaptureSignature.java
com/radaee/util/PDFThumbGrid.java

and subsititute

import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;

with:

import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;

which are used in class
com/radaee/view/PDFViewPager.java

and in ViewLib/build.gradle
change the dependency
api 'com.android.support:support-v4:28.0.0'
to:
api 'androidx.legacy:legacy-support-v4:1.0.0'

 

 

Applies To

All Products

Details

Created : 2020-11-12 11:35:59, Last Modified : 2021-05-27 13:36:41

Order history

Login to handle your order history.