Difference between support-v4.app.fragment and app.fragment?

I am new to fragments and asked a question: When I updated my SDK tool and went on to create a project (min = api8, by default), I noticed android-support-v4.jar support in my reference library.

When I expanded my class and tried to use the Fragment class, I found that there are 2. One of them is android.app.Fragment, and the other is the android.support.v4.app.Fragment file. What is the difference between the two?

+6
source share
1 answer

If you are developing Android 3+, you can use app.Fragment.

However, in 3-, Fragments did not yet exist. This is where the support library comes in. It provides snippets for older versions of Android.

See also this link.

+13
source

Source: https://habr.com/ru/post/921904/


All Articles