android - Tabs, Material Design and Support Library -


goal:

  • implement tabs.

conditions:

  • use only api21+ (lolipop+) components.
  • use material design.

noticed @ current state android has:

so how developers supposed implement tabs on android 5.0+ (api21+, lolipop+) applications? using deprecated stuff rejected. using tablayout leads appcompat usage.

android material usage docs: https://developer.android.com/training/material/index.html

i haven't found single document describing how tabs should implemented, except appcompatactivity or android.support.design.widget.tablayout.

i mean, looks nonsense:

  • android releases material design.
  • developers cannot use material design directly, because there no components (e.g. tabs) in api21+, , forced use theme.appcompat stuff instead.

appcompat created ease need of having maintain different components / values different apis. handles (as best platform/api allows) material design stuff you.

some components, cardview (support library v7 @ time of writing), has internal implementations different api levels. example on below api 21, has render shadows differently (for "elevation" not supported in apis).

as such, , silly sounds, have use appcompat tho want latest , greatest.

one wish google the right thing 1 day, , not stop supporting old devices (they fine, work, old, leave them in peace, offer critical security patches if needed) , move forwards in time supporting less "old apis", remove "support libraries" altogether. don't want know version of fragment supposed use. don't want think "fragmentmanager or supportfragmentmanager", don't want think childfragmentmanager (wtf…?), etc.

kudos targeting api 21+, same if developing own app. :-)


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -