我想要在SwipeRefreshLayout中显示Google地图,以便在刷新标记时获得奇特的进度圈。我注意到你不能再向上移动地图,因为它触发了SwipeRefreshLayout。我已经尝试过使用setDistanceToTriggerSync()
,并且在拉动时不再刷新,但我仍然无法移动他向上绘制的地图。我正在使用的代码:Android SwipeRefreshLayout禁用通过拉动刷新
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:id="@+id/map_refresh">
</android.support.v4.widget.SwipeRefreshLayout>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.SupportMapFragment" />
</LinearLayout>
如果你不想刷卡刷新,为什么你需要'SwipeRefreshLayout'。如果您只需刷新地图,则可以尝试使用“SyncAdapter”或“JobSchedule API”。 – bjiang
我只想看看装载圈 – qwertz