简体   繁体   中英

android.support.v4.view.ViewPager is there any equivalent in android.app package and why early version?

I have few general questions concerning android.support.v4.view.ViewPager. For my app I set as min sdk version 14. However I decided to use android.support.v4.view.ViewPager as it's very simple solution and very friendly for users. However google writes "Note this class is currently under early design and development. The API will likely change in later updates of the compatibility library, requiring changes to the source code of apps when they are compiled against the newer version." android doc

However when looking for tutorials and help, I noticed that it's not probably true as there are many examples in Internet. Thus it doesn't seem to be so new. Do you know what is the real situation with this class and will it be supported in future?

Is there any way not to use support library as then my app file becomes quite big?

Moreover I noticed quite strange thing when creating DialogFragment's. I'm not allowed to use android.app.DialogFragment but I have to use android.support.v4.app.DialogFragment then. I'm wondering if it can lead to any problems? Is there any solution to use android.app.DialogFragment with ViewPager?

Concluding when ViewPager will become normal class not within support library?

Do you know what is the real situation with this class and will it be supported in future?

If for some bizarre reason Google does not support it, the community will.

Is there any way not to use support library as then my app file becomes quite big?

Your app file will not become quite big if you use ProGuard properly.

I'm not allowed to use android.app.DialogFragment but I have to use android.support.v4.app.DialogFragment then.

There are two versions of the Android Support package: v4 and v13. The v4 version has only the v4 version of FragmentPagerAdapter and FragmentStatePagerAdapter . The v13 version has both the v4 and the v13 version of FragmentPagerAdapter and FragmentStatePagerAdapter . The v13 version works with native Android fragments.

Concluding when ViewPager will become normal class not within support library?

Probably never. The Android Support package is not only for backports.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM