android - How to shrink Columns to add new textview in 2nd line -
android - How to shrink Columns to add new textview in 2nd line -
i have add together textviews horizontally according info have in array. able add together textviews coming in single line. want add together new text view in next line automatically when width of view in overreached. here code add together text views. using table layout add together textview dynamicaly.
tablelayout artistsview = (tablelayout) findviewbyid(r.id.artists); string[] array = jbutils.getinstance().splittextbycomma(vo.getstarcast()); tablerow row = new tablerow(_context); tablelayout.layoutparams params = new tablelayout.layoutparams(tablelayout.layoutparams.match_parent, tablelayout.layoutparams.wrap_content); row.setlayoutparams(params); (int = 0; < array.length; i++) { textview textview = new textview(_context); textview.settext(array[i]); row.addview(textview); } artistsview.addview(row);
you utilize library: flowlayout
android
Comments
Post a Comment