I have been trying to find a solution for this for weeks and keep putting this on my backlist, I am unable to wrap the height of a LinearLayout
.
I have a simple LinearLayout
<LinearLayout
android:id="@+id/tagsLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="left"
android:paddingRight="10dp"
android:paddingBottom="5dp"
android:padding="5dp"/>
Then I am adding multiple TextViews
using my code into that LinearLayout
with Tags Link style
Txt.SetBackgroundResource(Resource.Drawable.roundtext);
Txt.SetPadding(30, 10, 30, 10);
Txt.SetTextColor(global::Android.Graphics.Color.ParseColor("#373944"));
Txt.SetTextSize(Android.Util.ComplexUnitType.Dip, 12);
See the last TextView never goes to the next line
I looked up so many threads and solutions and it turns out that LinearLayout
cannot Wrap contents like this Instead I will have to create my own Layout such as FlowLayout
Is there any simple solution to this problem?