Android Design Support Library And Material Design Backwards Compatibility? -


i'm new here, bear me! i'm sorta confused new design support library (and how 1 implements support libraries), , had 2 questions:

  • i'm confused how support libraries implemented. simple saying 'if os version below version 5.0, use v7 support library', or have code 'alternative layout'(one devices running +5.0, , 1 devices running older version of android?)
  • does design support library replace or add-to v7 support libraries? (if wanted include, say, cards , snack bar in app, able use design support library or have use along v7 cardview library? know it's stupid question, want make sure.)

thanks lot!

you can use support libraries backport features introduced last api (for example 21) old devices running previous api level.

for example, api21 introduced new widget, toolbar. widget can used in device api >=21.

with appcompat rel.21 (a v7 support library) can use toolbar (pay attention package) implement toolbar in old devices running api>=7.

this can happen because support libraries included in apk.

the design support library new library add new features. contains views snackbar, textinputlayout, floatingactionbutton, doesn't contain card.

so use dependency design support library:

compile 'com.android.support:design:22.2.0' 

this dependency use appcompat library

compile 'com.android.support:appcompat-v7:22.2.0' 

this dependency official cardview

compile 'com.android.support:cardview-v7:22.2.0' 

check official doc more info.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -