次のジレンマがあります。2 つの要素が重なり合っています。底にwrap_content
は高さがあります。2 つの要素が重なることなく、一番上の要素で残りのスペースを埋める必要があります (これはFrameLayout
、たとえば使用した場合に発生します)。
幅はmatch_parent
すべての要素の幅です。
モックアップを次に示します (わかりやすくするために一部の属性を省略しています)。
<LinearLayout android:layout_height="match_parent">
<CustomView android:layout_height="???????" />
<TextView android:layout_height="wrap_content">
</LinearLayout>