Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android.view.ActionMode vs android.support.v7.view.ActionMode, which one should I use and what are the differences?

I am using 'AppCompact' and I was implementing 'ActionMode.Callback' and I saw 2 different 'ActionMode' with same override methods. The 'android.view.ActionMode' is doing what I wanted to do in my app, but i'm little bit confused which one should i use, what is the difference between them?

like image 714
Ragib Avatar asked Dec 02 '25 06:12

Ragib


1 Answers

The support libraries provide newer API features for older SDK versions. If your minimum SDK version is less than Lollipop (Android 5.0, API 21) then you must use the support library version of ActionMode (android.support.v7.view.ActionMode), otherwise you can use normal library version (android.view.ActionMode).

like image 57
Gunavant Patel Avatar answered Dec 03 '25 20:12

Gunavant Patel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!