android - How to put layout inside another layout? -


I want to put one layout in another layout but when I do this, it will be on NullPointerException relLayout.addView (squareLayout); (Int i = 0; i <6; i ++) for line

  {for (int j = 0; j & lt; 7; j ++ ) {Find Relative Layout Relativity = (Relative Layout) VVID (Relays [ii] [J]); RelLayout.removeAllViews (); Find Relative Layout Square Layout = (Relative Layout) ViviIID (RID Square); RelLayout.addView (squareLayout); }}   

Please tell me what should I do? rellayout

relAllViews () while reaching the method Code> is not zero so either the findViewById () or any other thread is set to empty for example relLayout .

Comments