Android的 - 与特定指数的布局PARAMS添加子视图(在code) [英] Android - add subview with layout params at specific index (in code)
问题描述
我可能失去了一些东西,但我不能找到一种方法,一个子视图与特定布局PARAMS指定索引处添加到视图。有 addView(视图V,的LayoutParams LP)
并有 addView(视图V,INT指数)
- 但我可以'找不到一种方法来同时指定。
I may be missing something, but I can't find a way to add a subview to a view at a specified index with specific layout params. There's addView(View v, LayoutParams lp)
and there's addView(View v, int index)
- but I can't find a way to specify both.
我是什么失踪?
推荐答案
为什么,有与两个方法: addView(查看孩子,INT指数,ViewGroup.LayoutParams PARAMS)
:<一href=\"http://developer.android.com/reference/android/view/ViewGroup.html#addView%28android.view.View,%20int,%20android.view.ViewGroup.LayoutParams%29\"相对=nofollow>这里。
Why, there's a method with both: addView(View child, int index, ViewGroup.LayoutParams params)
: Here.
这篇关于Android的 - 与特定指数的布局PARAMS添加子视图(在code)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!