I have a LinearLayout with two views
<LinearLayout>
<TextView />
<Textview />
</LinearLayout>
Through my program, I want to add a third TextView between these two existing TextViews‘.
It was easy to do with a RelativeLayout with layout_below parameter. How do I do this for LinearLayout?
LinearLayout.addView(View v, int index)The docs are a good place to start with this sort of thing.
Just pass an index to where you want it placed (i.e. 2nd position would be index 1).