私はAndroidを初めて使用し、Google Webサイトでサンプルコードを調べています。私が現在取り組んでいるコードは SwipeRefreshLayout です: http://developer.android.com/samples/SwipeRefreshLayoutBasic/index.html
コードでは、リストビューに対して SwipeRefreshLayout が実行されていることがわかります。つまり、リスト ビューを下にドラッグすると、メソッドがトリガーされ、リストビューが更新されます。
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swiperefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
私を混乱させているのは、リストビューを下にドラッグしたときにリストビューの上部に表示されるプログレスアニメーションバーのコードにレイアウトがないことです。SwipeRefreshLayout を下にドラッグすると、ユーザーが xml でレイアウトを指定しなくても、プログレス アニメーション バーが自動的に生成されると思いますか?
たとえば、更新時にアニメーションが画面の端に触れないように、プログレス アニメーション バーの両端にパディングを置きたい場合、どうすればよいでしょうか?
https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.htmlは、実際にはそれについて何も言いません。