K
K
Kirill2018-07-09 19:32:29
Android
Kirill, 2018-07-09 19:32:29

What is the difference between support.v4.fragment and app.fragment?

Can you explain in a simple way in which cases it is better to use app.fragment and in which support.v4.fragment?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
illuzor, 2018-07-09
@PainMain

The difference is that the version from android.app is tied to the version of the operating system and, depending on this version, may work differently. The version from support.v4 will always work the same regardless of OS version.
In all cases, you need to use the version from the support library. Also, android.app.Fragment is deprecated .
This does not only apply to fragments. Read about the support library in general.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question