最代码官方的gravatar头像
最代码官方 2015-09-29 16:14:50

android开发通过FragmentStatePagerAdapter实现动态切换、删除Fragment的demo实例

最近在开发最代码的android客户端,发现由于分享和问答的类实现复用,所以抽象为ProjectFragment通过type来区分是分享还是问答,但是FragmentPagerAdapter无法实现这两个Fragment的内容切换,均加载同一个数据,于是在github上找了下相类似的demo,发现FragmentStatePagerAdapter可以实现,分享下该demo Example-FragmentStatePagerAdapter

最代码目前的客户端demo截图

android开发通过FragmentStatePagerAdapter实现动态切换、删除Fragment的demo实例

该demo的项目截图

android开发通过FragmentStatePagerAdapter实现动态切换、删除Fragment的demo实例

App Module Setting

android开发通过FragmentStatePagerAdapter实现动态切换、删除Fragment的demo实例

运行gif图


打赏

文件名:android开发通过FragmentStatePagerAdapter实现动态切换、删除Fragment的demo.rar,文件大小:5756.829K 下载
  • /
      • /Example-FragmentStatePagerAdapter
          • /Example-FragmentStatePagerAdapter/.git
            • /Example-FragmentStatePagerAdapter/.git/HEAD
            • /Example-FragmentStatePagerAdapter/.git/config
            • /Example-FragmentStatePagerAdapter/.git/description
              • /Example-FragmentStatePagerAdapter/.git/hooks
                • /Example-FragmentStatePagerAdapter/.git/hooks/applypatch-msg.sample
                • /Example-FragmentStatePagerAdapter/.git/hooks/commit-msg.sample
                • /Example-FragmentStatePagerAdapter/.git/hooks/post-update.sample
                • /Example-FragmentStatePagerAdapter/.git/hooks/pre-applypatch.sample
                • /Example-FragmentStatePagerAdapter/.git/hooks/pre-commit.sample
                • /Example-FragmentStatePagerAdapter/.git/hooks/pre-push.sample
                • /Example-FragmentStatePagerAdapter/.git/hooks/pre-rebase.sample
最代码最近下载分享源代码列表最近下载
511076827  LV33 2022年4月10日
梦本是很好的啦  LV11 2021年11月5日
copy_zb  LV8 2021年8月13日
cpemy_abc  LV10 2020年6月9日
wlw123  LV6 2020年6月7日
小肥羊  LV16 2019年7月24日
你是我不一样的烟火  LV11 2018年1月25日
wujinxing  LV16 2017年6月11日
好好如  LV3 2016年6月6日
最代码最近浏览分享源代码列表最近浏览
wxb666  LV3 3月13日
panwill  LV5 2023年8月18日
yyyyyyzh  LV8 2023年6月11日
小妹妹  LV7 2023年6月9日
qazwer11  LV5 2023年5月26日
叙利亚葫芦娃12315646 2023年5月24日
暂无贡献等级
1256489 2022年12月11日
暂无贡献等级
xz2000525  LV2 2022年6月7日
xushanze  LV1 2022年6月6日
1532593037  LV8 2022年6月3日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友