Как сделать так, чтобы за прокручиваемым макетом следовал другой макет в активности 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
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

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