0
私はリストビューでデータを取得していますが、トーストを使用して検証しましたが、レイアウトで推測するとスワイプしてリストビューdata.Belowがメインのレイアウトファイルです。リストビューをリフレッシュするためにスワイプダウンしてリストデータを表示しない
activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:background="@android:color/white"
android:layout_height="wrap_content"
tools:context=".MainActivity">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.AppBarLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/appBarLayout"
android:theme="@style/AppTheme.AppBarOverlay">
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" />
<ListView
android:id="@+id/text_json"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/holo_blue_dark"
android:textColorHighlight="@android:color/primary_text_dark"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:cacheColorHint="#00000000"
android:textSize="14sp" />
</android.support.v4.widget.SwipeRefreshLayout>
</RelativeLayout>
だけリストビューのために – dex
おかげ.ITが働いていた多くのことをSwipeRefreshLayoutを置きます。 – Addy
これを回答セクションに入れます – dex