How to create / remove TextViews from a view dynamically

0

I'm developing an Android app that has a RecycleView of CardView, and inside this card I'm showing some information via TextViews, so some objects do not have all the information. How would I reduce the cardView when there was no information about that field, so I did not leave the blank?     Currently my CardView works as a 3x2 "matrix" of textviews
I know it would probably solve by creating several cardView with textView settings, but would you like to know if there is a less laborious way? Since of these 6 fields only 2 are required.

    
asked by anonymous 26.03.2018 / 19:13

0 answers