Search code examples
androidandroid-viewlayoutparams

Android - add subview with layout params at specific index (in code)


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.

What am I missing?


Solution

  • Why, there's a method with both: addView(View child, int index, ViewGroup.LayoutParams params): Here.