android如何在布局开始时添加视图?

问题描述:

我的问题很简单.我有一个线性布局.它具有一些子视图.现在,我想在孩子的开始处添加一个视图.表示在正常的addView(view)中,将view添加到布局的末尾.但我想在开始时的第一个位置添加它.任何想法... ???

My question is simple. I have a linearlayout. It has some child views. Now I want to add a view at the start of the child. Means in normal addView(view), the view s added at the end of the layout. But I want to add it at start, at first position. Any idea...???

使用

Use addView (View child, int index) with index = 0