BottomNavigationView:FrameLayout 与 ViewPager

BottomNavigationView : FrameLayout vs ViewPager

我正在我的应用程序中实现 BottomNavigationView,但我所看到的教程都没有说明这一点。

我应该使用

这两种方法的优缺点是什么(对于 BottomNavigationView,当然不是一般情况,我可以 RTFM),有没有 Google 或老聪明的程序员推荐其他(虽然在 the doc 中看不到)?

Should I use a FrameLayout (like here), and have my fragments appear and disappear, or a ViewPager (like here), and have my fragments swipe like with a TabLayout?

前者。 The material design specs expressly indicate that you should not swipe between bottom navigation。 (参见 "Scrolling")。

引用:

Using swipe gestures on the content area does not navigate between views.