<legend id='xtAor'><style id='xtAor'><dir id='xtAor'><q id='xtAor'></q></dir></style></legend>

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

        • <bdo id='xtAor'></bdo><ul id='xtAor'></ul>
      1. <tfoot id='xtAor'></tfoot>
        <i id='xtAor'><tr id='xtAor'><dt id='xtAor'><q id='xtAor'><span id='xtAor'><b id='xtAor'><form id='xtAor'><ins id='xtAor'></ins><ul id='xtAor'></ul><sub id='xtAor'></sub></form><legend id='xtAor'></legend><bdo id='xtAor'><pre id='xtAor'><center id='xtAor'></center></pre></bdo></b><th id='xtAor'></th></span></q></dt></tr></i><div id='xtAor'><tfoot id='xtAor'></tfoot><dl id='xtAor'><fieldset id='xtAor'></fieldset></dl></div>
      2. PagerTabStrip 中的文本未在第一个视图中显示

        Text in PagerTabStrip not displayed upon 1st view(PagerTabStrip 中的文本未在第一个视图中显示)

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

                <bdo id='kHabV'></bdo><ul id='kHabV'></ul>

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

                    <tbody id='kHabV'></tbody>
                  <legend id='kHabV'><style id='kHabV'><dir id='kHabV'><q id='kHabV'></q></dir></style></legend>
                  本文介绍了PagerTabStrip 中的文本未在第一个视图中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有以下简单的设置:

                  swipeable.xml

                  这种奇怪行为的原因是什么?

                  解决方案

                  对我来说,这个问题发生在我更新了 support-v13(或 v4)之后,appcompat-v7recyclerview-v7design 库到 23.0.0.我想这是一个错误.降级到22.2.1后,一切正常.

                  我建议等到他们发布这些库的新版本.

                  更新:此问题仅出现在 appcompat-v7design 库中,现已在 23.1 中得到修复.0 Android 支持库的修订.

                  I have the following simple setup:

                  swipeable.xml

                  <LinearLayout
                      android:id="@+id/content_frame"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:orientation="vertical" >
                  
                      <include layout="@layout/toolbar" />
                  
                      <android.support.v4.view.ViewPager
                          android:id="@+id/pager"
                          android:layout_width="match_parent"
                          android:layout_height="match_parent" >
                  
                          <android.support.v4.view.PagerTabStrip
                              android:layout_width="match_parent"
                              android:layout_height="wrap_content"/>
                      </android.support.v4.view.ViewPager>
                  </LinearLayout>
                  

                  Activity:

                  public class InfoActivity extends ActionBarActivity {
                  
                    private static final int[][] KEYS = { { R.string.usage, R.string.usage_text }, 
                                                          { R.string.data_protection, R.string.data_protection_text }, 
                                                          { R.string.impressum, R.string.impressum_text } };
                  
                    @Override
                    protected void onCreate( Bundle savedInstanceState ) {
                      setContentView( R.layout.swipeable );
                      super.onCreate( savedInstanceState );
                      ViewPager viewPager = (ViewPager)findViewById( R.id.pager );
                      viewPager.setAdapter( new SwipeAdapter( getSupportFragmentManager() ) );
                    }
                  
                    class SwipeAdapter extends FragmentStatePagerAdapter {
                  
                      public SwipeAdapter( FragmentManager fm ) {
                        super( fm );
                      }
                  
                      @Override
                      public Fragment getItem( int position ) {
                        Bundle b = new Bundle();
                        b.putInt( "key", KEYS[ position ][ 1 ] );
                        return Fragment.instantiate( InfoActivity.this, InfoFragment.class.getName(), b );
                      }
                  
                      @Override
                      public int getCount() {
                        return KEYS.length;
                      }
                  
                      @Override
                      public CharSequence getPageTitle( int position ) {
                        return getString( KEYS[ position ][ 0 ] ).toUpperCase();
                      }
                    }      
                  }
                  

                  If I access the activity the 1st time, no pagerstrip-texts are shown. If I swipe or click the tab, the texts are displayed normally:

                  What could be the reason for such a strange behavior?

                  解决方案

                  For me this issue happened after I updated the support-v13 (or v4), appcompat-v7, recyclerview-v7 and design libraries to 23.0.0. I guess it is a bug. After downgrading it to 22.2.1, it is working fine.

                  I would suggest to wait until they release new revision of these libraries.

                  Update: This issue is occurring only in appcompat-v7 and design libs, which has now got fixed in 23.1.0 revision of Android Support Library.

                  这篇关于PagerTabStrip 中的文本未在第一个视图中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Android- listview, service mediaplayer, and boolean flags(Android-listview、服务媒体播放器和布尔标志)
                  SharedPreferences amp; boolean(SharedPreferences amp;布尔值)
                  readBooleanArray throws RuntimeException(quot;bad array lengthsquot;)(readBooleanArray 抛出 RuntimeException(“错误的数组长度))
                  CheckBox[] with onClickListener[]?(带有 onClickListener[] 的 CheckBox[]?)
                  Android: How to check if Google is available?(Android:如何检查 Google 是否可用?)
                  android resolve .local (mDNS)(android 解析 .local (mDNS))
                  <legend id='kOWNN'><style id='kOWNN'><dir id='kOWNN'><q id='kOWNN'></q></dir></style></legend>

                    <tbody id='kOWNN'></tbody>

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

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

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

                            <bdo id='kOWNN'></bdo><ul id='kOWNN'></ul>