<small id='UZ39Q'></small><noframes id='UZ39Q'>

    1. <i id='UZ39Q'><tr id='UZ39Q'><dt id='UZ39Q'><q id='UZ39Q'><span id='UZ39Q'><b id='UZ39Q'><form id='UZ39Q'><ins id='UZ39Q'></ins><ul id='UZ39Q'></ul><sub id='UZ39Q'></sub></form><legend id='UZ39Q'></legend><bdo id='UZ39Q'><pre id='UZ39Q'><center id='UZ39Q'></center></pre></bdo></b><th id='UZ39Q'></th></span></q></dt></tr></i><div id='UZ39Q'><tfoot id='UZ39Q'></tfoot><dl id='UZ39Q'><fieldset id='UZ39Q'></fieldset></dl></div>

        <bdo id='UZ39Q'></bdo><ul id='UZ39Q'></ul>
    2. <tfoot id='UZ39Q'></tfoot>
      <legend id='UZ39Q'><style id='UZ39Q'><dir id='UZ39Q'><q id='UZ39Q'></q></dir></style></legend>

      1. 从 ViewPager 中删除或清除所有片段

        Remove or Clear All Fragments From ViewPager(从 ViewPager 中删除或清除所有片段)

            <bdo id='aGiDR'></bdo><ul id='aGiDR'></ul>
            1. <small id='aGiDR'></small><noframes id='aGiDR'>

              <i id='aGiDR'><tr id='aGiDR'><dt id='aGiDR'><q id='aGiDR'><span id='aGiDR'><b id='aGiDR'><form id='aGiDR'><ins id='aGiDR'></ins><ul id='aGiDR'></ul><sub id='aGiDR'></sub></form><legend id='aGiDR'></legend><bdo id='aGiDR'><pre id='aGiDR'><center id='aGiDR'></center></pre></bdo></b><th id='aGiDR'></th></span></q></dt></tr></i><div id='aGiDR'><tfoot id='aGiDR'></tfoot><dl id='aGiDR'><fieldset id='aGiDR'></fieldset></dl></div>
                <tbody id='aGiDR'></tbody>
                  <legend id='aGiDR'><style id='aGiDR'><dir id='aGiDR'><q id='aGiDR'></q></dir></style></legend>
                  <tfoot id='aGiDR'></tfoot>

                  本文介绍了从 ViewPager 中删除或清除所有片段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在通过类似这样的片段填充视图寻呼机

                  I'm populating view pager through fragments likes this

                  pagerAdapter = new PagerAdapter(getSupportFragmentManager());
                          mViewPager = (ViewPager) findViewById(R.id.container);
                  
                          for (int i = 0; i < 10; i++) {
                              newfragment fragobj = new newfragment();
                              fragobj.setArguments(bundle);
                              pagerAdapter.addFragment(fragobj, "Category");
                          }
                  
                              mViewPager.setAdapter(pagerAdapter);
                              mViewPager.setCurrentItem(page);
                  

                  我想清除所有碎片并在清除后添加新的碎片.如果我现在添加新片段,它会使用旧片段进行广告.

                  I want to clear all fragments and add new fragments after clearing. If I add new fragments now it ads on with old fragments.

                  我尝试了许多堆栈溢出答案,但没有一个对我有用.

                  I tried many stack overflow answers but none of them worked for me.

                  推荐答案

                  片段已经被移除和销毁.问题在于浏览量.

                  the fragment was already getting removed and destroyed. the issue was of viewpages.

                  只有这个对我有用

                  myViewPager.setSaveFromParentEnabled(false);
                  

                  干杯!

                  这篇关于从 ViewPager 中删除或清除所有片段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How can I use CClistview in COCOS2d Android?(如何在 COCOS2d Android 中使用 CClistview?)
                  cocos2d-android: how to display score(cocos2d-android:如何显示分数)
                  Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)
                  SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)
                  Android file copy(安卓文件拷贝)
                  Android how to detect Copy event of Edittext in android(Android如何在android中检测Edittext的Copy事件)
                      <tbody id='hDodN'></tbody>

                      1. <tfoot id='hDodN'></tfoot>

                        <small id='hDodN'></small><noframes id='hDodN'>

                        • <bdo id='hDodN'></bdo><ul id='hDodN'></ul>
                          • <legend id='hDodN'><style id='hDodN'><dir id='hDodN'><q id='hDodN'></q></dir></style></legend>
                            <i id='hDodN'><tr id='hDodN'><dt id='hDodN'><q id='hDodN'><span id='hDodN'><b id='hDodN'><form id='hDodN'><ins id='hDodN'></ins><ul id='hDodN'></ul><sub id='hDodN'></sub></form><legend id='hDodN'></legend><bdo id='hDodN'><pre id='hDodN'><center id='hDodN'></center></pre></bdo></b><th id='hDodN'></th></span></q></dt></tr></i><div id='hDodN'><tfoot id='hDodN'></tfoot><dl id='hDodN'><fieldset id='hDodN'></fieldset></dl></div>