Как сделать так, чтобы за прокручиваемым макетом следовал другой макет в активности AndroidAndroid

Форум для тех, кто программирует под Android
Anonymous
Как сделать так, чтобы за прокручиваемым макетом следовал другой макет в активности Android

Сообщение Anonymous »


Here is what I want to get in my android activity:

+------------------++------------------++------------------+ | +--------------+ || +--------------+ || +--------------+ | | | Table | || | Table | || | Table #| | | | | || | | || | #| | | | | || | | || | #| | | | | || | | || | #| | | +--------------+ || | | || | #| | | +--------------+ || | | || | #| | | | Linearlayout | || | | || | #| | | +--------------+ || +--------------+ || | | | | || +--------------+ || | | | | || | Linearlayout | || +--------------+ | | || +--------------+ || +--------------+ | | || || | Linearlayout | | | || || +--------------+ | | +------------+ || +------------+ || +------------+ | | | Button | || | Button | || | Button | | | +------------+ || +------------+ || +------------+ | +------------------++------------------++------------------+ Goals:
  • I have a table of variable length.
  • The table shall be scrollable if it cannot be fully displayed
  • I want the Linearlayout to always be next to the table
  • The button shall always be positioned at the bottom

I have tried many combinations of ConstraintLayout and Linearlayout wihtout success:
  • Or the Linearlayout disappears when the table is too long
  • Or the Linearlayout stays close to the Button.

Here is an example of code (simplified) that does not work:

... ... ... ..... I know I can achieve this by using a OnPreDrawListener, but I would prefer to have something more static, just with layouts in xml.

How can I achieve this?


Источник: https://stackoverflow.com/questions/780 ... n-an-andro

Вернуться в «Android»