title: Android XML Composite View
body: <p>I'm new to Android development, and am having a tough time working something out. I want to make a composite view (called SkillDiceGroup) of a TextView, EditText, and SkillDiceButton (which is an extension of the Button class). I have it working when declaring my SkillDiceGroup as pure code, and putting this in my XML layout:</p>
  
  <pre><code>   &lt;com.jeremybush.d20.SkillDiceGroup android:id="@+id/skillDiceTest"
       android:title="Foobar!"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"&gt;
     &lt;/com.jeremybush.d20.SkillDiceGroup&gt;
  </code></pre>
  
  <p>And I have this code:</p>
  
  <pre><code>public class SkillDiceGroup extends LinearLayout
  {
   // The View components
   private TextView mTitle;
   private EditText mSkill;
   private SkillDiceButton mDice;
  
   public SkillDiceGroup(Context context, AttributeSet attrs)
   {
    super(context);
  
    this.setOrientation(HORIZONTAL);
  
    mTitle = new TextView(context);
          mTitle.setText("foobar");
    addView(mTitle, new LinearLayout.LayoutParams(
     LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT
    ));
  
    mSkill = new EditText(context);
    addView(mSkill, new LinearLayout.LayoutParams(
     LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT
    ));
  
    mDice = new SkillDiceButton(context, attrs);
    mDice.setText("d20");
    addView(mDice, new LinearLayout.LayoutParams(
     LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT
    ));
   }
  
   private class SkillDiceButton extends DiceButton
   {
    public SkillDiceButton(Context context, AttributeSet attrs) {
     super(context, attrs);
    }
  
    public void onClick(View view)
    {
     modifier = Integer.parseInt(mSkill.getText().toString());
  
     super.onClick(view);
    }
   }
  }
  </code></pre>
  
  <p>This works how I want it, but I would like to declare the three items in the xml view on their own. How can I do this?</p>