在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):slidenerd/SwappableViewPagerMaterialDesign开源软件地址(OpenSource Url):https://github.com/slidenerd/SwappableViewPagerMaterialDesign开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):SwappableViewPagerMaterialDesignThis repository contains a ViewPager with Fragments which can be swapped within a tab on button click. Our sample demo has a MainActivity with a Fragment inside it occupying full space called TabbedFragment. This TabbedFragment supports 3 tabs where each tab has 3 fragments in it. TAB1=A1,A2,A3..and so on. All Fragments A1..C3 use a FrameLayout with a common ID which can be replaced. Each Fragment supports a button when when clicked starts a FragmentTransaction to replace it with the next Fragment. The Activity tracks onBackPressed() and forwards it all the appropriate fragments and awaits their response. The demo uses a custom FragmentPagerAdapter which maintains a SparseArray containing all the Fragments and removes , retrieves and adds the Fragments under the appropriate methods of the Adapter. The BackPressedListener is an interface used by a BackPressedImplementation class to handle back press actions in a Fragment. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论