Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有两个视图的 LinearLayout
<LinearLayout> <TextView /> <Textview /> </LinearLayout>
通过我的程序,我想TextView在这两个现有TextViews的 '. RelativeLayout使用withlayout_below参数很容易做到。我该怎么做LinearLayout?
TextView
TextViews
RelativeLayout
layout_below
LinearLayout
LinearLayout.addView(View v, int index)
文档是从这类事情开始的好地方。
只需将索引传递到您想要放置的位置(即第二个位置将是索引 1)。