Custom FrameLayout that adds items to sub FrameLayout?
<p>I am trying to make some kind of button that can have content added to it like it is done to a FrameLayout. For example:</p>

<pre><code>&lt;ch.pboos.android.ui.ContentButton ...&gt;
  &lt;LinearLayout ...&gt;
    &lt;TextView .../&gt;
    &lt;TextView .../&gt;
  &lt;/LinearLayout&gt;
&lt;/ch.pboos.android.ui.ContentButton&gt;
</code></pre>

<p>So far I made a view that xml file that would represent how i want the button to look like:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="match_parent"
  android:layout_height="match_parent" android:paddingLeft="@dimen/white_button_margin"
  android:paddingRight="@dimen/white_button_margin"&gt;
  &lt;LinearLayout android:layout_width="match_parent"
      android:layout_height="wrap_content" android:orientation="horizontal"
      android:padding="@dimen/white_button_padding"
      android:background="@drawable/channel_bg"&gt;

    &lt;FrameLayout android:id="@+id/content" ...&gt;
      &lt;!-- content --&gt;
    &lt;/FrameLayout&gt;
    &lt;ImageView ... android:src="@drawable/right_triangle" /&gt;
  &lt;/LinearLayout&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>Now I would like to make a custom FrameLayout (ch.pboos.android.ui.ContentButton) that will add that view and allow me to add views into the content area of that xml above.</p>

<p>Any suggestions on how to get this working correctly?</p>
