「スワイプで更新」機能をサポートする
コンテンツを定期的に自動更新するアプリであっても、ユーザーが手動更新をリクエストできるように設定できます。たとえば、天気予報アプリの場合に、ユーザーがオンデマンドで最新の予報を取得できるようにします。最新情報をリクエストするための標準的なユーザー エクスペリエンスを実現するため、Android プラットフォームには、「スワイプで更新」設計パターンが用意されています。これにより、ユーザーは垂直方向のスワイプで更新をトリガーすることができます。
サンプルアプリをダウンロードしてください。
レッスン
「スワイプで更新」機能をアプリに追加する ListView
または GridView
内で「スワイプで更新」機能をサポートする方法と、アクションバーを使用してアクセスしやすい更新オプションを提供する方法について説明します。更新リクエストに応答する 「スワイプで更新」ジェスチャーに応答する方法と、アクションバーのアクションから同じ更新を実行する方法について説明します。
Content and code samples on this page are subject to the licenses described in the Content License . Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2020-06-12 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"必要な情報がない"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"複雑すぎる / 手順が多すぎる"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"最新ではない"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻訳に関する問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"サンプル / コードに問題がある"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"その他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"わかりやすい"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"問題の解決に役立った"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"その他"
}]