Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should we use android.util.Pair or androidx.core.util.Pair?

Tags:

android

I just migrated to AndroidX, and noticed there's a new class called androidx.core.util.Pair.

I was wondering, going forward, should I use android.util.Pair or androidx.core.util.Pair?

like image 891
Cheok Yan Cheng Avatar asked Mar 24 '19 16:03

Cheok Yan Cheng


1 Answers

Yes, it is better to use androidx.core.util.Pair, from the docs:

(September 21, 2018)

This is the stable release of Support Library 28.0.0 and is suitable for use in production. This will be the last feature release under the android.support packaging, and developers are encouraged to migrate to AndroidX.

like image 200
Peter Haddad Avatar answered Sep 21 '22 06:09

Peter Haddad