title: Custom View not adding subviews
body: <p>This is my custom view:</p>
  
  <pre><code>public class FilterView extends RelativeLayout{
  
      public FilterView(Context context, AttributeSet attrs) {
          super(context, attrs);
          init();
      }
  
  
      public void init(){
      //To test, I add just a test button that will change the color of the view
          Button b = new Button(getContext());
          b.setOnClickListener(new OnClickListener() {
              public void onClick(View v) { setBackgroundColor(Color.GREEN); }
          });
          b.setText("TEST");
  
          RelativeLayout.LayoutParams lay = new RelativeLayout.LayoutParams(100, 100);
          addView(b, lay);
          //Also have tried without settings the layoutparams...
  
          setBackgroundColor(Color.BLUE);
      }
  }
  </code></pre>
  
  <p>I add this custom view in an activity like this (with a red background):</p>
  
  <pre><code>&lt;com.example.android.FilterView android:id="@+id/filter"
      android:layout_width="100dip"
      android:background="#FF0000"
      android:layout_height="100dip"/&gt;
  </code></pre>
  
  <p>The result is a view of color... BLUE, the one setted in the init(), so the code in init is called well. BUT, the view has nothing inside, its just blue, no button named "TEST", and no area is clickable because the view is not turned green wherever I click</p>