[英]SwiperRefreshLayout arrow indicator not showing
I have this problem, the first time I'm swiping down to show the spinner the arrow indicator is not showing: 我有这个问题,我第一次向下滑动显示箭头指示器未显示的微调器:
This is happening because of the RecyclerView because with a simple ListView is not happening. 这是因为RecyclerView,因为没有发生简单的ListView。
How I want to be: 我想成为:
This is the SwipeRefreshLayout XML: 这是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>
I really hope you can help me. 我真的希望你能帮助我。 Thank you! 谢谢!
swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimaryDark,R.color.colorPrimaryDark,R.color.colorPrimaryDark, R.color.colorPrimaryDark, R.color.colorPrimaryDark); 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>
and go to res/values check you color theme... 并去res /值检查颜色主题...
<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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.