Размещение накладывающегося или плавающего вида над другим видом в макетеAndroid

Форум для тех, кто программирует под Android
Ответить
Гость
 Размещение накладывающегося или плавающего вида над другим видом в макете

Сообщение Гость »


In an Android application, I have a layout containing a TextView at the top and two elements beneath it: an icon and another TextView. The second TextView displays a numerical value that undergoes a counter animation using ValueAnimator.

Upon completion of this counter animation, in doOnEnd blcok, I aim to overlay an additional animation. The animation file is available with me.

Specifically, I seek guidance on positioning this overlay animation as follows:
  • The overlay animation should float above the numerical value displayed by the second TextView.
  • It must not disrupt the layout flow of the page, akin to absolute positioning in web development, ensuring that it remains visually distinct from the layout while anchored to the specified number.

How can I achieve this positioning and overlay of the animation in my Android application? Any insights or guidance would be appreciated. Thank you.

Note - I plan to use the constrain layout. However, if this is possible by using other layouts, I would be happy to use it.

Note - Need to consider text resize / font scaling while implementating.


Изображение



Источник: https://stackoverflow.com/questions/779 ... -in-layout
Ответить

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

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

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

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

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