I'm trying to use PathInterpolator from android.support.v4.view.animation.PathInterpolatorCompat
because PathInterpolator won't work on my device API 18 since it was added in API 21.
I've downloaded the support repository, and included the following build.gradle under the app directory:
compile "com.android.support:support-v4:21.0.0"
I'm trying to use it like this:
PathInterpolator p_interpolator = new PathInterpolator(.5f,1.0f);
However, in Android Studio it prompts the import from: android.view.animation.PathInterpolator instead of giving me an option for the compat version.
What do I need to do?
Editor's Note: the right usage of PathInterpolatorCompat is (as @fernforce mentioned in a comment on the accepted answer):
PathInterpolator p_interpolator = PathInterpolatorCompat.create(.5f,1.0f);