2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
ViewCapture
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ViewCapture ダンプとは、位置、サイズ、スケール、可視性をはじめとする特定の時点でのウィンドウのビュー階層のスナップショットです。一方、ViewCapture トレースでは、状態の時系列シーケンスが提供され、ビューの動作の推移に関する分析情報が得られます。簡単に言うと、ウィンドウ内のビューとそのプロパティに関する情報をキャプチャするのが ViewCapture で、これを使用すると、特定の瞬間のユーザー エクスペリエンスを把握し、時間の経過に伴う変化を追跡できます。電池アイコンが表示されない、または通知のちらつきが発生するといった問題のトラブルシューティングに便利です。
Winscope の ViewCapture ビューアを使用すると、その時点でのビューの状態の可視化し、時間の経過に伴うビューの変化を観察して、バグや異常値に関するビュー階層データを分析できます。フレームごとに可視化することで、画面を録画するよりビューの状態の検査が簡単になります。また、ビューのトレース収集は画面の録画より CPU 負荷が少ないため簡単に有効化できます。
トレースの収集方法の詳細については、ViewCapture をご覧ください。
タブの構造
ViewCapture のタブは、長方形ビュー、階層ビュー、プロパティ ビューの 3 つのパネルに分かれています。
図 1. ViewCapture のトレース分析。
長方形ビュー
画面の左側には、ビュー階層の 3D ビューが表示されます。長方形ビューでは、ビューの境界、Z オーダー、不透明度が考慮されます。
長方形ビューの上部にあるメニューには、利用可能なウィンドウがすべて表示されます。表示内容を選択する際に、特定のウィンドウまたはすべてのウィンドウを選択できます。
図 2. ViewCapture の長方形ビュー。
階層ビュー
タブの中央のセグメントには、ビュー階層が表示されます。このビューには、ビュー間の親子関係に加えて以下の情報が含まれます。
プロパティ ビュー
デバッグを容易にするために、ViewCapture ビューアでは厳選されたプロパティのリストが提供され、情報がより整理された形式で表示されます。このリストには次のカテゴリが含まれます。
- ビュー: ビュー ID。
- ジオメトリ: 座標、サイズ、スケールなどのビューの形状に関する詳細情報。
- エフェクト: ビューに関するエフェクトとその他のプロパティ。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-03-05 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-03-05 UTC。"],[],[],null,["# ViewCapture dumps are snapshots of a window's view hierarchy at a specific time,\nincluding location, size, scale, and visibility. ViewCapture traces, on the\nother hand, provide a chronological sequence of states, offering insights into\nhow views behave over time. Simply put, ViewCapture captures information about\nviews within a window and their properties, letting you understand the user\nexperience at specific moments and track changes over time. This is useful for\ntroubleshooting issues like *my battery icon is missing* or *my notification\nflickered*.\n\nWinscope's ViewCapture viewer lets you visualize the view state at a moment in\ntime, watch view changes over time, and analyze view hierarchy data for bugs or\nanomalies. The frame-by-frame visualization makes it easier to inspect view\nstates compared to screen recordings. Collecting view traces is also less\nCPU-intensive than screen recording, making it easier to enable.\n\nSee [ViewCapture](/docs/core/graphics/winscope/capture/adb#capture-adb-vc)\nfor more information about trace collection.\n\nTab structure\n-------------\n\nThe ViewCapture tab is split in three panels: rects view, hierarchy view, and\nproperties view:\n\n**Figure 1.** ViewCapture trace analysis.\n\n### Rects view\n\nThe left side of the screen features a 3D view of the view hierarchy. The rects\nview considers view bounds, z-order, and opacity.\n\nThe rects view has a menu at the top that displays all available\nwindows. You can select a specific window or all of them when choosing what to\ndisplay:\n\n**Figure 2.** ViewCapture rects view.\n\n### Hierarchy view\n\nThe tab's central segment shows the view hierarchy. In addition to the\nparent-child relationships between view, this view also includes the following\ninformation:\n\n- **V:** Identifies visible views.\n\n### Properties view\n\nTo make debugging easier, the ViewCapture viewer provides a curated list of\nproperties, presenting the information in a more organized format. This list\nincludes the following categories:\n\n- **View:** View identifier.\n- **Geometry:** Coordinates, size, scale, and other details about the view geometry.\n- **Effects:** Effects and other miscellaneous properties for the views."]]