14
SwipeRefreshLayout setRefreshing()最初未显示指标
我有一个非常简单的布局,但是当我打电话setRefreshing(true)在onActivityCreated()我的片段,将其最初不显示。 仅在我执行刷新操作时显示。有什么想法为什么它最初没有出现? 片段xml: <android.support.v4.widget.SwipeRefreshLayout android:id="@+id/swipe_container" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </RelativeLayout> </ScrollView> </android.support.v4.widget.SwipeRefreshLayout> 片段代码: public static class LinkDetailsFragment extends BaseFragment implements SwipeRefreshLayout.OnRefreshListener { @InjectView(R.id.swipe_container) SwipeRefreshLayout mSwipeContainer; public static LinkDetailsFragment newInstance(String subreddit, String linkId) { Bundle args = new Bundle(); args.putString(EXTRA_SUBREDDIT, subreddit); args.putString(EXTRA_LINK_ID, linkId); LinkDetailsFragment …