compatibility - Appropriate way to use Android Support Library -
when created new app, got this
class newapplicationactivity extends actionbaractivity{... } so have read that, if want use new feature newer api level, better make such there alternative option app combat situation minsdkversion plan support.
assuming true, lets decide build app against targetsdkversion = 21(which did in above example), base activity class actionbaractivity. support library , works older version(down android 2.1 guess..).
the thing is, stuck these alternative set of support libraries rather platform libraries. gonna miss significant if happens? chance incorporate platform specific code api 21 app ever? majority of apps made compatibility in mind. how people handle this?
support libraries such appcompat (which actionbaractivity , replacement appcompatactivity part of) designed reflect latest platform changes , backport as possible. thereby using appcompat, using large number of api 21 features (such material theme).
of course, there nothing stopping including any api level in application: make sure guarded appropriate api level checks: many of compat classes in support v4 such notificationcompat , viewcompat you.
Comments
Post a Comment