L'écriture personnalisée LinearLayout android

J'ai une mise en page personnalisée qui attire transparente rectangle arrondi en dessous de ses enfants. Le problème, c'est quand j'essaie de l'ajouter à mon fichier xml, il ne s'est pas présenté. Aussi, lorsque j'essaie d'ajouter des paramètres à elle (c'est à dire android:layout_width) le popup montre qu'aucun d'entre eux sont disponibles. La même chose arrive à tout enfant vues-je ajouter. Quelqu'un peut-il aider?

public class RoundRectLayout extends LinearLayout 
{ 
 private RectF shape;
 public RoundRectLayout(Context context)
 {
  super(context);
  LayoutInflater layoutInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  layoutInflater.inflate(R.layout.settings, this);
  shape = new RectF();
 }

 public RoundRectLayout(Context context, AttributeSet attrs)
 {
  super(context, attrs);
  LayoutInflater layoutInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  layoutInflater.inflate(R.layout.settings, this);
  shape = new RectF();
 }

 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh)
 {
  shape = new RectF(0, 0, w - 5, h - 5);
  super.onSizeChanged(w, h, oldw, oldh);
 }

 @Override
 protected void dispatchDraw(Canvas canvas)
 {
  Paint temp = new Paint();
  temp.setAlpha(125);
  canvas.drawRoundRect(shape, 10f, 10f, temp);
  super.dispatchDraw(canvas);
 }
}