【问题标题】:SwiperRefreshLayout arrow indicator not showingSwiperRefreshLayout 箭头指示器未显示
【发布时间】:2015-11-16 16:44:03
【问题描述】:

我遇到了这个问题,我第一次向下滑动以显示微调器时箭头指示器没有显示:

这是因为 RecyclerView 而发生的,因为没有发生简单的 ListView。

我想成为什么样的人:

这是 SwipeRefreshLayout XML:

<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipeRefreshLayout_pitchList"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v7.widget.RecyclerView
    android:id="@+id/recyclerView_pitchList"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#ffffff"
    android:scrollbars="vertical">
</android.support.v7.widget.RecyclerView>

我真的希望你能帮助我。谢谢!

【问题讨论】:

    标签: android android-recyclerview swiperefreshlayout


    【解决方案1】:

    swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimaryDark,R.color.colorPrimaryDark,R.color.colorPrimaryDark, R.color.colorPrimaryDark, R.color.colorPrimaryDark);

        <android.support.v4.widget.SwipeRefreshLayout
                android:id="@+id/swipe_refresh_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
    
                <android.support.v7.widget.RecyclerView
                    android:id="@+id/recycler_view"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:padding="5dp"
                    android:scrollbars="vertical" />
    
            </android.support.v4.widget.SwipeRefreshLayout>
    

    然后去 res/values 检查你的颜色主题...

       <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/black</item>
        <item name="android:textColor">@color/black</item>
        <item name="android:textColorSecondary">@color/colorPrimary</item>
        <item name="windowActionBar">false</item>
        <item name="windowActionBarOverlay">true</item> 
       </style>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-10-09
      • 1970-01-01
      • 1970-01-01
      • 2013-11-18
      • 2016-01-18
      • 1970-01-01
      • 2013-07-20
      相关资源
      最近更新 更多