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.