In every activity i m calling this function.I m getting the output i.e footer layout if i m displaying only that layout,but i m getting the error when i m attaching that layout with the main layout using
mainlayout.addView(footerlayout);
please help me


