I have my own layout
public class MyLayout extends ViewGroup
Inside that Layout I put some buttons. That works fine. But I trie to add LayoutParams
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(80, 80);
Button btn = new Button(getActivity());
btn.setLayoutParams(params);
myLayout.addView(btn);
and access it in MyLayout
View child = getChildAt(i);
ViewGroup.LayoutParams params = child.getLayoutParams();
I only see 0 as height and width. What is wrong in my code?