May 17, 2016

In this tutorial I’m going to show you the differences between and Nowadays whatever applications are being made they all use Fragments. Using Fragments we make our applications smoother. However our IDE shows two option when we use the Fragment, one is and the other is The question arises which to use when.
Below I’m listing out few of the differences between and

  1. was introduced in API Level 11. So if we use, we will not be able to make an app for below API 11.
  2. If we are using Fragments and want to work in all devices, then we should stick to the However, if we are targeting devices running API 11 or above then we should use
  3. Suppose in our application we have to use ViewPager then we cannot use, then we should stick to the support library.
  4. However, if the requirement is to use and ViewPager together, then we have to use “”. Here we have to use v13 support jar.
  5. If in our application we are using Fragments and that Fragments contain other fragments then we should only use “” Here the support library will give us a support version of the child fragments manager.