简体   繁体   中英

How to add two textview with orientation vertical(One below other) in a table row without using xml?

I want add two textview with orientation vertical(One below other) in a table row without using xml that is by programatically. Can anyone suggest me how to do this? Is there any other way than this? Already there are many textviews in a tablerow(horizontally).

Put a LinearLayout in the TableRow cell. Put the two TextView widgets in the LinearLayout . Use Java constructors to create the LinearLayout and the TextView widgets. Use addView() to add the TextView widgets to the LinearLayout .

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