android - Which fragment library should I import? -


i implementing fragments drawerlayout. have 2 options when import fragments

  1. android.support.v4.app

  2. android.app

which 1 should use ? dont see difference except seems android.support.v4.app has no support objectanimator.

what suggest ?

edit: plan on supporting api level 14 , higher...

it depends on whether using support library.

if using fragments below api level 11 use android.support.v4.app. in case extend fragmentactivity base class of support based fragments.

if using fragments in api level 11 , above use android.app. in case extend standard activity.

take @ below link , decide on versions app should run. depending on decide whether need support library or not.

https://developer.android.com/about/dashboards/index.html

i plan on supporting api level 14 , higher...

then there no need use support library. use

import android.app.fragment 

and extend standard activity.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -