title: Programmatically added Views not behaving
body: <p>I've created many custom views and I am trying to add them to my fragment. They get added but I can't seem to get them to go where I want. There should be 2 columns and 3 rows but it ends up as 1 column with all of the custom views stacked on top of one another. Here is my code to add the views and set the layout params to the fragment layout:</p>
  
  <pre><code>RelativeLayout fm = (RelativeLayout) view.findViewById(R.id.fragmentLayout);
  
      RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
  
      params.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
      CustomImages cs = new CustomImages(getActivity());
      cs.setId(R.id.one);
      cs.setLayoutParams(params);
  
      params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
      params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);
      params.addRule(RelativeLayout.RIGHT_OF, cs.getId());
      CustomImages2 cs2 = new CustomImages2(getActivity());
      cs2.setId(R.id.two);
      cs2.setLayoutParams(params);
  
      RelativeLayout.LayoutParams params2 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
      params2.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
      params2.addRule(RelativeLayout.BELOW, cs2.getId());
      CustomImages3 cs3 = new CustomImages3(getActivity());
      cs3.setId(R.id.three);
      cs3.setLayoutParams(params);
  
      RelativeLayout.LayoutParams params3 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
      params3.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);
      params3.addRule(RelativeLayout.RIGHT_OF, cs3.getId());
      CustomImages4 cs4 = new CustomImages4(getActivity());
      cs4.setId(R.id.four);
      cs4.setLayoutParams(params);
  
      RelativeLayout.LayoutParams params4 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
      params4.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
      params4.addRule(RelativeLayout.BELOW, cs4.getId());
      CustomImages5 cs5 = new CustomImages5(getActivity());
      cs5.setId(R.id.five);
      cs5.setLayoutParams(params);
  </code></pre>