いくつかのアクティビティで特定の線形レイアウトを使用する必要がある Android アプリケーションがあります。そのため、必要なlinearlayoutを別のxmlファイルに抽出しましたが、そのレイアウトを他のレイアウトに追加する方法がわかりません。簡単に言えば、私の考えは次のとおりです。
<xml layout id: "SomeSharedControls" />
<xml layout id:"mainWindow">
add @id SomeSharedControls
...
other xml controls in current window
...
</xml>
<xml layout id: "anotherWindow">
add @id SomeSharedControls
...
other xml controls in current window
...
</xml>
それを達成する方法は?