As an Android Developer, I am developing a Kotlin app in which on a certain screen I have to make a horizontal carousel of items whose specifications are as follows:
- If the nested text in TextView1 is long enough to span 3 lines, the whitespace below TextView2 will be a fixed 12dp.
- If the text nested in TextView1 is long enough to occupy more than 3 lines, the situation will be the same as for the previous point but with the ellipsize="end" property for TextView1.
- If the text nested in TextView1 only occupies 1 line, the space between TextView2 and TextView3 will grow until it occupies the space not used by TextView1 as in the previous points.
This image is what it should look like: https://i.stack.imgur.com/ppCL5.png
Notes:
- All items in the carousel must have the same height.
- We are not allowed to set a minHeight or height for the container of the view commented.
- The screen has to be prepared for fontScaling and accessibility.
- I can't use Jetpack Compose due to QA team automation test issues, so this option is totally ruled out.
- I can't upload images because I don't have enough reputation on StackOverflow.
Thanks in advance.