简体   繁体   中英

vertical stacking of text views in expandableListView

Hello fellow devs,

I've got an odd requirement that I'd like to share that relates to an expandableListView. I'm going to try and explain via screenshots.

现在看起来如何

That's how it looks now, with just two text views showing two values. The requirement I got is to "push the values up, allowing room to enter two more values below" I've asked if I can just append the two additional TextViews to the existing linearLayout, but got a strong "No, we do not want that."

Below is a new screenshot with how I think they want it to look (assume all text is the same font).

完成后的外观

Is this even possible? I'm not seeing any way to stack related textviews vertically without adding another child view, which I don't think they will be happy with. Thanks.

I would get the second text under the first and use spannable to alter the text size, just a taught. Edit--> And alter the style with html

String text = "<font color=#cc0029>Erste Farbe</font> <font color=#ffcc00>zweite Farbe</font>";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM